Skip to content

Fix browser HotReload test trimming - #136651

Merged
radekdoulik merged 1 commit into
dotnet:mainfrom
radekdoulik:radekdoulik-hotreload-r2r-build-fix
Nov 2, 2026
Merged

radekdoulik merged 1 commit into
dotnet:mainfrom
radekdoulik:radekdoulik-hotreload-r2r-build-fix

Conversation

@radekdoulik

Copy link
Copy Markdown
Member

Fix IL1032 in the browser HotReload test by passing an extensionless assembly name to TrimmerRootAssembly, not a DLL path.

Copy only the EnC helper after ConfigureTrimming to preserve its metadata and debug attributes. Add NoInlining to the updated method in all three source snapshots so the linker cannot replace calls with the original return value. Other assemblies remain linked.

Validated in Chromium on macOS/arm64: CoreCLR trimmed R2R from the generated ZIP, plus trimmed and untrimmed CoreCLR and Mono without R2R. All five runs applied both deltas. Mono used a local helper-reference import; its CI quarantine is unchanged. Linux and the full library suite were not run.

Note

Generated with GitHub Copilot.

Root the EnC helper by assembly name and preserve only its baseline after shared trimming configuration. Keep mutable-method calls intact with identical NoInlining flags in the baseline and both delta snapshots.

Co-authored-by: Copilot App <[email protected]>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@radekdoulik radekdoulik added the arch-wasm WebAssembly architecture label Oct 30, 2026
@radekdoulik radekdoulik added this to the 12.0.0 milestone Oct 30, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block approval of the HotReload trimming and method-inlining changes.

No open issues 🎉

What changed in this PR

Fixes trimming configuration in the browser HotReload test so Edit-and-Continue updates retain the metadata they require while other assemblies remain linked.

Changes:

  • Passes an extensionless assembly name to TrimmerRootAssembly instead of a DLL path.
  • Sets only the EnC helper assembly to TrimMode="copy" after ConfigureTrimming.
  • Adds NoInlining to the updated method in all three source snapshots to prevent constant folding of calls.
File Description
src/​tests/​FunctionalTests/​WebAssembly/​Browser/​HotReload/​WebAssembly.Browser.HotReload.Test.csproj Corrects assembly rooting and preserves the EnC helper after trimming configuration.
src/​tests/​FunctionalTests/​WebAssembly/​Browser/​HotReload/​ApplyUpdateReferencedAssembly/​MethodBody1.cs Adds NoInlining to the baseline method.
src/​tests/​FunctionalTests/​WebAssembly/​Browser/​HotReload/​ApplyUpdateReferencedAssembly/​MethodBody1_v2.cs Adds matching NoInlining to the second update snapshot.
src/​tests/​FunctionalTests/​WebAssembly/​Browser/​HotReload/​ApplyUpdateReferencedAssembly/​MethodBody1_v1.cs Adds matching NoInlining to the first update snapshot.

Review effort: Balanced

@radekdoulik
radekdoulik merged commit 28aa064 into dotnet:main Nov 2, 2026
99 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-Infrastructure

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants