Skip to content

[release/10.0] Fix Native AOT-incompatible reflection in CalendarTestBase#126817

Merged
JulieLeeMSFT merged 2 commits intorelease/10.0from
copilot/fix-japanese-calendar-tests
Apr 16, 2026
Merged

[release/10.0] Fix Native AOT-incompatible reflection in CalendarTestBase#126817
JulieLeeMSFT merged 2 commits intorelease/10.0from
copilot/fix-japanese-calendar-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 13, 2026

Change #122373 broke native AOT testing because it introduced trimming incompatible code into a test.

/cc @MichalStrehovsky

Customer Impact

  • Customer reported
  • Found internally

Test only change. We broke release/10.0 using a release/10.0-only change.

Regression

  • Yes
  • No

Testing

Outerloop run.

Risk

Low. Test only.

IMPORTANT: If this backport is for a servicing release, please verify that:

  • For .NET 8 and .NET 9: The PR target branch is release/X.0-staging, not release/X.0.
  • For .NET 10+: The PR target branch is release/X.0 (no -staging suffix).

Package authoring no longer needed in .NET 9

IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version.
Keep in mind that we still need package authoring in .NET 8 and older versions.

Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/a684b399-ef09-407d-8de5-9e4680d4f736

Co-authored-by: MichalStrehovsky <13110571+MichalStrehovsky@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot April 13, 2026 01:01
Copilot AI changed the title [WIP] Fix Japanese calendar tests failing due to null reference exception Fix Native AOT-incompatible reflection in CalendarTestBase Apr 13, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-system-globalization
See info in area-owners.md if you want to be subscribed.

@MichalStrehovsky
Copy link
Copy Markdown
Member

/azp run runtime-nativeaot-outerloop

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@MichalStrehovsky MichalStrehovsky changed the title Fix Native AOT-incompatible reflection in CalendarTestBase [release/10.0] Fix Native AOT-incompatible reflection in CalendarTestBase Apr 13, 2026
@MichalStrehovsky MichalStrehovsky marked this pull request as ready for review April 13, 2026 11:37
Copilot AI review requested due to automatic review settings April 13, 2026 11:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to restore NativeAOT test compatibility by adjusting reflection usage in the Japanese calendar test infrastructure (CalendarTestBase) on release/10.0, after a prior change introduced trimming/AOT-incompatible reflection patterns.

Changes:

  • Reworks reflection used to compute the ICU-specific JapaneseCalendar minimum supported date (era ticks) to be more NativeAOT-friendly.

@JulieLeeMSFT JulieLeeMSFT modified the milestones: 11.0.0, 10.0.x Apr 15, 2026
@JulieLeeMSFT JulieLeeMSFT added Servicing-consider Issue for next servicing release review Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Apr 15, 2026
@JulieLeeMSFT
Copy link
Copy Markdown
Member

Please check build/test failures.

@MichalStrehovsky
Copy link
Copy Markdown
Member

/ba-g native aot outerloop CoreCLR test tree outerloop is known to be broken. the one build break in the libs leg on osx arm64 is known too. the rest of native aot outerloop libs legs that this is expected to fix is indeed fixed.

@JulieLeeMSFT JulieLeeMSFT merged commit 033bea8 into release/10.0 Apr 16, 2026
126 of 141 checks passed
@JulieLeeMSFT JulieLeeMSFT deleted the copilot/fix-japanese-calendar-tests branch April 16, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants