Set CoreCLR runtime flavor for WASM Webcil conversion - #8
Closed
LoopedBard3 wants to merge 2 commits into
Closed
LoopedBard3 wants to merge 2 commits into
LoopedBard3 wants to merge 2 commits into
Conversation
Remove NoWasmValidator, which required every Task/ValueTask benchmark to be tagged NoWASM. BenchmarkDotNet now awaits async workloads, so returning an awaitable is no longer a reason to exclude a benchmark from WASM. Enable Perf_AsyncMethods, ValueTaskPerfTest, MemoryStreamTests.CopyToAsync and the MemoryStreamChunkedTests async benchmarks. Validated on Mono WASM (Node) and CoreCLR WASM (V8). Other async benchmarks keep their NoWASM tags. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Apply RuntimeFlavor after BenchmarkDotNet's UseMonoRuntime override so Webcil conversion selects the CoreCLR format. Cover R2R and non-R2R property evaluation while preserving Mono defaults. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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
Set
RuntimeFlavor=CoreCLRwhenUseMonoRuntime=falseinMicroBenchmarks.Wasm.targets, independently of the ReadyToRun opt-in. BenchmarkDotNet imports.Wasm.propsbefore its CoreCLR override and.Wasm.targetsafterward, so the setting must be applied in the latter.After dotnet/runtime#134312, CoreCLR requires Webcil wrapper version 2. The WebAssembly SDK selects Webcil payload version 1 (which produces wrapper version 2) only when
RuntimeFlavor=CoreCLR; the pinned BenchmarkDotNet generator setsUseMonoRuntime=falsebut leavesRuntimeFlavorunset. This can produce wrapper version 0 for converted assemblies, causing errors such asWebcil asset '/Dia2Lib.dll' has unsupported Webcil wrapper version 0; expected 2.Add MSBuild-backed regression coverage for CoreCLR with and without R2R, unchanged Mono/unset behavior, and the generated project import order. Document the configuration in the WASM workflow. No runtime changes or private Webcil-version override.
Validation
python -m pytest scripts\tests\test_wasm_coreclr_r2r.py -q: 47 passed, including 12 new MSBuild evaluation cases. The new tests reproduced 4 CoreCLR failures / 8 passes before the fix.Microsoft.NET.Sdk.WebAssembly.Browser.targetsatb965265e2454e3469580c09012e424e46608e7d7executed_ResolveWasmConfiguration: baseline CoreCLR selected payload 0; fixed CoreCLR selected payload 1 with R2R off and on; Mono remained payload 0.git diff --checkpassed.No benchmark execution or full WASM publish was performed locally. The internal WASM-only sanity-check-only run is managed separately; this session did not queue CI.
AI disclosure: This change and its regression coverage were prepared with GitHub Copilot.