Skip to content

test: reproduce AOT/trim failure for #195 (do not merge)#217

Draft
maximn wants to merge 1 commit into
masterfrom
test/aot-compat-fails-until-fixed
Draft

test: reproduce AOT/trim failure for #195 (do not merge)#217
maximn wants to merge 1 commit into
masterfrom
test/aot-compat-fails-until-fixed

Conversation

@maximn

@maximn maximn commented May 23, 2026

Copy link
Copy Markdown
Owner

Repro for #195 — intentionally failing. Do not merge.

Enables IsAotCompatible on net8.0 and promotes IL2026, IL2104, IL3050, IL3053 to errors in GoogleMapsApi/GoogleMapsApi.csproj. No source changes.

Today's failures (5 errors)

  • Engine/MapsAPIGenericEngine.cs:39JsonSerializer.Deserialize<T>(string, JsonSerializerOptions) (IL2026 + IL3050)
  • Engine/JsonConverters/EnumMemberJsonConverter.cs:75Enum.GetValues(Type) (IL3050)
  • Engine/JsonConverters/EnumMemberJsonConverter.cs:95Enum.GetValues(Type) (IL3050)
  • Engine/JsonConverters/EnumMemberJsonConverter.cs:123Type.MakeGenericType(...) in EnumMemberJsonConverterFactory (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 Release is green with this csproj change in place.

Why not for merge

Merging would break master for everyone on net8.0 until the fix lands. Two paths forward:

  1. Cherry-pick the csproj diff into the fix PR so both arrive together.
  2. Keep this branch around as a living repro; close once the fix is merged.

Out of scope

  • The actual JsonSerializerContext source-gen change.
  • net10.0 (not on master yet); add the same condition for it in the fix PR if relevant.
  • A runtime AOT smoke test (PublishAot console app) — possible follow-up.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant