Repository navigation
[browser] Disable stack trace line numbers by default on publish - #136971
Merged
pavelsavara merged 3 commits intoNov 6, 2026
Merged
Conversation
Preserve development-build defaults and explicit source-location opt-in. Resolve runtime feature configuration before trimming no-build publishes, and verify build-publish-build behavior with browser regression tests. Co-authored-by: Copilot <[email protected]>
|
Azure Pipelines: Successfully started running 4 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
Resolve WebAssembly configuration before trimming only in the outer publish. Initializing it in native-only nested publishes generates an incomplete boot manifest and completion stamp before the managed assemblies are staged. Co-authored-by: Copilot <[email protected]>
pavelsavara
marked this pull request as ready for review
November 6, 2026 09:30
pavelsavara
requested review from
akoeplinger,
ilonatommy,
lewing and
maraf
as code owners
November 6, 2026 09:30
maraf
reviewed
Nov 6, 2026
Set the default in the guarded publish target when the CLI publishing flag is absent. Cover direct MSBuild publishing and move the stack trace probe into the shared test app with its standard output helper and runtime category. Co-authored-by: Copilot <[email protected]>
maraf
approved these changes
Nov 6, 2026
Member
Author
|
/ba-g known windows infra |
This was referenced Nov 6, 2026
This was referenced Nov 9, 2026
maraf
added a commit
that referenced
this pull request
Nov 25, 2026
<!-- --> ## Summary Add focused WebAssembly review guidance based on recurring PR feedback, without expanding global repository instructions. - Put the general guide in the runtime-neutral `docs/workflow/wasm-review.md`, covering SDK/workload/in-tree ownership, configuration consumers, native build bridges, incremental outputs and Static Web Assets. - Extend the Wasm.Build.Tests README with scenario/output-helper reuse, category selection, scoped binlog observations and coverage guidance. - Add a Wasm-scoped instruction router and link the guide from the existing Wasm documentation index. Documentation only; no product code, test implementation or public API changes. ## Independent historical-review validation Four fresh sessions reviewed two merged PRs: one baseline and one new-guidance reviewer per PR. Each reviewed the exact source head attached to the original feedback, not the final merged code. Original comments, expected findings and counterpart results were withheld from reviewers; their first-pass responses were saved and hashed before comparison. | PR | Frozen pre-feedback head | Baseline agreement | New-guidance agreement | | --- | --- | --- | --- | | [#136971](#136971) | `1e6c03358c1575baaf29538bf630ab0647a16beb` | 1.5/4 | 4/4 | | [#136772](#136772) | `d9f1d954190aa89869e920bbf7b98f9324862240` | 0/3 | 2/3 | | **Total** | | **1.5/7** | **6/7** | Scoring criteria were fixed before launch: 1 for a specific actionable equivalent to the original feedback, 0.5 for an incomplete equivalent, and 0 for absent or generic advice. These measure feedback agreement, not production-defect counts. Original feedback was published by the reviewer's account; some comments explicitly disclose Copilot assistance. | Feedback criterion | Baseline | New guidance | | --- | --- | --- | | Direct MSBuild Publish default and coverage | 0 | 1 | | Proper shared testasset/scenario | 0.5 | 1 | | Standard test-output helper | 0 | 1 | | CoreCLR runtime category | 1 | 1 | | Synchronize the equivalent SDK workload-manifest condition | 0 | 0 | | Share the literal CMake feature baseline | 0 | 1 | | Respect the separate Mono CMake bridge and runtime-specific policy | 0 | 1 | The baseline asset recommendation moved the program into a replacement fixture; the guided recommendation used a shared application scenario, matching the original follow-up more closely. Both arms missed the SDK manifest synchronization. The relevant equivalent SDK gate was subsequently verified in version-pinned source, not by executing the historical SDK. Both native reviews also found the supported DLL-named R2R output being excluded by an extension filter and incomplete all-image stamp assertions; these common findings are not credited as guidance uplift. Guided output was not a strict superset: baseline-only advice included preserving the first build's binlog and adding independent alignment-rewriter regression tests. ### Limitations This is a small retrospective comparison on two cases used to derive the guidance, not a held-out, randomized or causal demonstration of general improvement. The coordinator knew the treatment arms; inherited instructions, temporally newer contributor docs, skill availability and probe use were not fully controlled. Reviewers explicitly consumed the new Markdown content, so automatic instruction-router activation was not tested. No full historical SDK/browser/toolchain scenario was reproduced, and no zero-false-positive rate is claimed. ## Validation - `git diff --check` — passed. - `npm exec --yes --package markdownlint-cli -- markdownlint .github/instructions/wasm.instructions.md docs/workflow/wasm-review.md src/mono/wasm/Wasm.Build.Tests/README.md docs/workflow/wasm-documentation.md` — passed with repository configuration. - Session-local documentation validator — passed 18 relative link/anchor checks, 14 existing positive and 8 negative routing examples, frontmatter, final newlines and trailing whitespace. This checks the explicit globs, not live Copilot routing. - Runtime builds/browser tests were not run for these Markdown-only changes. One baseline historical reviewer ran isolated MSBuild selection and synthetic alignment probes using a newer host SDK; those are not full historical-toolchain validation. > [!NOTE] > This PR description was generated with the assistance of GitHub Copilot. --------- Co-authored-by: Copilot App <[email protected]>
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.
Summary
StackTraceLineNumberSupporttofalsefor browser publishing, including Debug publish, while preserving development-build defaults and explicit property values.dotnet publish --no-build.This is a behavioral change: published CoreCLR managed stack traces keep method names, but source file/line lookup now requires explicit opt-in. The existing property restores the previous behavior:
Breaking-change documentation has been prepared as a local draft; the source PR is not merged yet.
Size evidence
Using the source-built WebAssembly SDK pack with the same optimized
12.0.0-alpha.1.26528.120browser runtime pack, a minimal trimmed Debug Blazor publish gives:*.wasm.gzbytesThe default removes exactly System.Collections.Immutable, System.Diagnostics.StackTrace, System.IO.Compression, System.IO.MemoryMappedFiles and System.Reflection.Metadata from both the linked closure and published WebCIL assets: 241,152 managed bytes and 104,563 gzip bytes saved. The consumed SDK target bytes were verified against the source-built package.
Locally built unoptimized Debug CoreLib can retain unreachable PDB-reader code after feature substitution. Size results above intentionally use an optimized shipping runtime pack; browser behavior tests use the locally built Debug runtime.
Validation
All commands ran from the isolated Windows worktree.
Passed: zero warnings/errors.
Passed: zero warnings/errors.
Passed in Chrome: 6 passed, 0 failed, 0 skipped, including all four new cases and both existing trimmed-PDB cases. The new cases check actual source-line availability and retained method names across build/publish/build. Against the unchanged SDK package, the two new default-publish cases failed because source lines remained enabled; both explicit-override cases passed.
Two additional minimal publishes with the changed SDK package passed exact assertions for the linked and published five-assembly difference above.
git diff --checkpassed.The complete WBT suite, Mono runtime lane, and interactive managed debugger were not run.
Nested-publish CI follow-up
The early configuration dependency initially ran inside native-only nested publishes.
That generated an incomplete boot manifest before the outer publish staged managed
assemblies, then poisoned its shared incremental completion stamp. A guarded wrapper
now keeps the early dependency in the outer publish only; the original satellite and
reference preparation still runs in both contexts.
The existing workload
LazyLoadingTests.FailOnMissingLazyAssemblyreproducedBLAZORSDK1001with the unguarded package and passed with the guarded source-builtpackage. Existing coverage therefore catches this regression without adding redundant
tests.
Passed: zero warnings/errors.
Passed in Chrome: 1 passed, 0 failed, 0 skipped.
Passed in Chrome: 4 passed, 0 failed, 0 skipped, covering defaults, explicit
true/false, no-build publish, and build/publish/build. An initial run had one
ten-second harness exit-message timeout; that exact published opt-in artifact
independently printed source information, method name and
WASM EXIT 0, and thecomplete four-case confirmation above passed.
All consumed package targets matched the final source bytes.
git diff --checkpassed. The complete CI matrix and full Mono test lane have not been rerun locally.
Review follow-up: direct MSBuild publishing
The guarded publish target now applies the line-number default even when publishing
with
dotnet msbuild -t:Publish, which does not supply_IsPublishing. Explicitproperty values remain honored. The managed probe is now a standard
StackTraceTestscenario in WasmBasicTestApp, usesTestOutput.WriteLine, and thetheory uses the
coreclrtest category.The expanded theory covers CLI and direct-MSBuild publishing, no-build publishing,
explicit true/false, and build/publish/build. Against the preceding package, both
direct-MSBuild default cases failed because source lines remained enabled; the
other six cases passed.
The source-built SDK package passed with zero warnings/errors:
Final browser validation:
Passed in Chrome: 8 passed, 0 failed, 0 skipped.
Passed in Chrome: 1 passed, 0 failed, 0 skipped. Packaged target bytes match the
source;
git diff --checkpassed.Resolves #135222
Note
This PR was generated with assistance from GitHub Copilot.