Enable runtime-async for SharedFx-only libraries#66200
Conversation
There was a problem hiding this comment.
Pull request overview
Enables the runtime-async feature for .NET 11+ projects that ship only in the shared framework, and extends the same enablement to compatible test projects while attempting to avoid WebAssembly where it’s incompatible.
Changes:
- Turn on
runtime-asyncforIsAspNetCoreApp=trueprojects that are not packable and targetnet11.0+. - Turn on
runtime-asyncforIsTestProject/IsTestAssetProjecttargetingnet11.0+. - Add a
TargetOS != browsercondition intended to avoid wasm scenarios.
Agent-Logs-Url: https://github.com/dotnet/aspnetcore/sessions/41a0b51b-1b8a-49be-99b9-41c10b7cb732 Co-authored-by: wtgodbe <14283640+wtgodbe@users.noreply.github.com>
| <Features>$(Features);runtime-async=on</Features> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Also enable runtime async for compatible test projects --> |
There was a problem hiding this comment.
I assume that the tests would fail if not for this, right? Otherwise, I'd probably want to run in both modes at least temporarily.
There was a problem hiding this comment.
I think they would, but I'm largely cribbing off of what runtime did: dotnet/runtime#125406
…godbe/runtime-async
|
There's now a consistent failure in
Looking |
@halter73 @BrennanConroy think we should skip this one for now? |
|
@copilot Quarantine |
Agent-Logs-Url: https://github.com/dotnet/aspnetcore/sessions/ee6acbab-717b-438e-a17d-9b6c48506040 Co-authored-by: wtgodbe <14283640+wtgodbe@users.noreply.github.com>
Done in 84530c9. Added |
Add blame-hang diagnostics with 5m per-test timeout to identify which specific tests hang with runtime-async enabled. Increase pipeline timeout to 180m to allow the run to complete. Fix script to preserve post-processing after nonzero test exit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This test hangs indefinitely with runtime-async enabled due to a runtime bug with async continuation rooting. Without runtime-async the test fails cleanly via WaitAssert timeout. See dotnet/runtime#126735 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…godbe/runtime-async
|
@copilot please update the PR in the following ways - Don't enable runtime-async for test |
…ests.yml Agent-Logs-Url: https://github.com/dotnet/aspnetcore/sessions/c3cca376-481c-4186-a887-d43d9ab31f9e Co-authored-by: wtgodbe <14283640+wtgodbe@users.noreply.github.com>
Done in fc44762. Removed |
|
/backport to release/11.0-preview4 |
|
Started backporting to |
Cribbing off of dotnet/runtime#125406. Enable runtime-async for net11.0+ projects that ship only in the Shared Framework. We can't enable it for projects that ship both in the SharedFx & as packages, because runtime-async is incompatible w/ wasm, so anyone who tried to use such a package in a wasm project would be broken.
Also enables runtime-async for tests.
The wasm exclusion checks both
$(TargetOS) != browserand!$(RuntimeIdentifier.StartsWith('browser-'))to correctly exclude projects that target WebAssembly viaRuntimeIdentifier=browser-wasmeven when$(TargetOS)is empty.Description
Enables the
runtime-asynccompiler feature fornet11.0+projects that ship only in the ASP.NET Core Shared Framework (IsAspNetCoreApp=true,IsPackable!=true) and for compatible test/test-asset projects. Projects that are also shipped as NuGet packages are excluded because runtime-async is incompatible with WebAssembly, which would break wasm consumers.Wasm exclusion is enforced by checking both
$(TargetOS) != browserand!$(RuntimeIdentifier.StartsWith('browser-'))to cover the case where$(TargetOS)is empty but the project targets wasm viaRuntimeIdentifier=browser-wasm.