test: reproduce AOT/trim failure for #195 (do not merge)#217
Draft
maximn wants to merge 1 commit into
Draft
Conversation
Enables IsAotCompatible on net8.0 and promotes IL2026/IL2104/IL3050/IL3053 to errors. Build fails today on JsonSerializer.Deserialize and the enum JsonConverterFactory call sites — the exact surface a source-generated JsonSerializerContext fix needs to cover. Intentionally not for merge: this branch is a living acceptance test for the eventual AOT fix.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Repro for #195 — intentionally failing. Do not merge.
Enables
IsAotCompatibleonnet8.0and promotesIL2026,IL2104,IL3050,IL3053to errors inGoogleMapsApi/GoogleMapsApi.csproj. No source changes.Today's failures (5 errors)
Engine/MapsAPIGenericEngine.cs:39—JsonSerializer.Deserialize<T>(string, JsonSerializerOptions)(IL2026 + IL3050)Engine/JsonConverters/EnumMemberJsonConverter.cs:75—Enum.GetValues(Type)(IL3050)Engine/JsonConverters/EnumMemberJsonConverter.cs:95—Enum.GetValues(Type)(IL3050)Engine/JsonConverters/EnumMemberJsonConverter.cs:123—Type.MakeGenericType(...)inEnumMemberJsonConverterFactory(IL3050)These are the exact call sites a source-generated
JsonSerializerContext+ per-enum converters need to replace.Acceptance criterion for the AOT fix PR
dotnet build GoogleMapsApi/GoogleMapsApi.csproj -f net8.0 -c Releaseis green with this csproj change in place.Why not for merge
Merging would break
masterfor everyone onnet8.0until the fix lands. Two paths forward:Out of scope
JsonSerializerContextsource-gen change.net10.0(not onmasteryet); add the same condition for it in the fix PR if relevant.PublishAotconsole app) — possible follow-up.