-
Notifications
You must be signed in to change notification settings - Fork 394
Generate AOT-compatible C# primitive responses #11931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Jorge Rangel (jorgerangel-msft)
merged 49 commits into
main
from
copilot/generate-aot-compatible-code
Sep 15, 2026
Merged
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
6fa6ca4
Initial plan
Copilot 79a59cb
fix(http-client-csharp): deserialize primitive responses without refl…
Copilot bea225a
fix(http-client-csharp): preserve BOM handling for primitive responses
Copilot e5e08e6
test(http-client-csharp): validate complete primitive response methods
Copilot 06ea139
Fix cspell error for FEFF in ExtensibleEnumTests.cs
Copilot 9278405
Cache enum/scalar response value in a variable instead of inline ternary
Copilot 248bdc9
Handle text/plain content type for primitive and enum responses
Copilot bba90fc
Add nullable enum test coverage for remaining isString/isExtensible c…
Copilot 0e496fe
Simplify plain-text response checks, avoid null-forgiving, fix mixed …
Copilot c6bbcbe
fix(http-client-csharp): refine plain text response conversion
Copilot b12eb64
merge: integrate plain-text response feedback
Copilot d9df7e9
refactor(http-client-csharp): consolidate plain text response helpers
Copilot 755b311
perf(http-client-csharp): cache plain text response content
Copilot ca77e1d
fix(http-client-csharp): fix unreachable text/plain conversion for ex…
Copilot 26058cc
refactor(http-client-csharp): inline single-use ShouldUseResultConver…
Copilot f7cd15f
chore(http-client-csharp): regenerate Sample-TypeSpec test project
Copilot 0766471
Merge branch 'main' into copilot/generate-aot-compatible-code
jorgerangel-msft 59cd778
fix(http-client-csharp): restrict raw text response parsing to primit…
Copilot 46fc557
fix(http-client-csharp): allow relative URIs in plain text response p…
Copilot 30b9413
fix(http-client-csharp): return null for unsupported plain text conve…
Copilot de7abee
refactor(http-client-csharp): resolve plain text parser before content
Copilot cd41087
test(http-client-csharp): avoid FEFF token in Local extensible enum test
Copilot 2c5ad78
test(http-client-csharp): build BOM prefix from UTF-8 preamble
Copilot 22c6a9d
fix(http-client-csharp): trim plain-text content before null-sentinel…
Copilot c541f53
fix(http-client-csharp): honor duration wire encoding in plain-text T…
Copilot d44785e
test(http-client-csharp): expand duration wire-encoding coverage to I…
Copilot bfd606d
refactor(http-client-csharp): extract ParseNumeric helper and add nul…
Copilot edecbdf
test(http-client-csharp): add Iso8601 nullable duration case, use nam…
Copilot c45a141
docs(http-client-csharp): clarify duration float/double parsing inten…
Copilot feb55b2
refactor(http-client-csharp): use string trim snippet
Copilot ba43450
refactor(http-client-csharp): unify Int64 duration parsing through Pa…
Copilot 71a36dd
test(http-client-csharp): reorder nullable duration test cases for re…
Copilot 6fc5626
refactor(http-client-csharp): unify numeric duration parsing
Copilot b479871
test(http-client-csharp): complete full nullable duration wire-encodi…
Copilot 6a50498
fix(http-client-csharp): reject unsupported duration formats
Copilot 8993f86
test(http-client-csharp): add negative test for unsupported duration …
Copilot b1270a9
test(http-client-csharp): cover JSON BOM primitive responses
Copilot 65f2baf
fix(http-client-csharp): trim BOM before JSON primitive parse
Copilot 2248ca1
test(http-client-csharp): cover JSON primitive BOM responses
Copilot 5415f39
test(http-client-csharp): consolidate JSON BOM coverage
Copilot 89152f8
fix(http-client-csharp): restore BOM-safe JSON parse and stop throwin…
Copilot 5119b68
fix(http-client-csharp): strip BOM in JSON fallback conversion for no…
Copilot 6a987a4
fix(http-client-csharp): make primitive response fallbacks safe
Copilot 0955d59
fix(http-client-csharp): simplify response parse generation
Copilot 1c66d03
test(http-client-csharp): revert local primitive response sample
Copilot 94acf3e
fix(http-client-csharp): avoid duration diagnostics for numeric formats
Copilot 9b2f4e2
fix(http-client-csharp): match text plain media types loosely
Copilot 9c05f25
fix(http-client-csharp): match exact plain-text media types
Copilot 9a84ed9
fix(http-client-csharp): remove BOM response handling
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...ers/TestData/ClientProviderTests/BackCompatibility_BothMethodsParamOrderChanged(Async).cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| public virtual async global::System.Threading.Tasks.Task<global::System.ClientModel.ClientResult<string>> UpdateResourceAsync(string param1, int param2, bool param3, global::System.Threading.CancellationToken cancellationToken = default) | ||
| { | ||
| global::Sample.Argument.AssertNotNullOrEmpty(param1, nameof(param1)); | ||
|
|
||
| using global::System.ClientModel.BinaryContent content = global::System.ClientModel.BinaryContent.Create(global::System.BinaryData.FromString(param1)); | ||
| global::System.ClientModel.ClientResult result = await this.UpdateResourceAsync(content, param2, param3, cancellationToken.ToRequestOptions()).ConfigureAwait(false); | ||
| using global::System.Text.Json.JsonDocument document = global::System.Text.Json.JsonDocument.Parse(result.GetRawResponse().Content); | ||
| string value = document.RootElement.GetString(); | ||
| return global::System.ClientModel.ClientResult.FromValue(value, result.GetRawResponse()); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.