Repository navigation
ci: test Repl compiled with runtime async in a non-blocking job - #215
Merged
Merged
Conversation
Runtime async is no longer a preview feature on net11.0, but Repl's packages cannot use it: .NET 11 WebAssembly runs on Mono, which does not support it, and Microsoft keeps its own NuGet packages off it for that reason (dotnet/runtime#125406, dotnet/aspnetcore#66200). - ReplRuntimeAsync (off by default) compiles net11.0 and later with runtime async and defines REPL_RUNTIME_ASYNC; pack fails when it is set. - Given_RuntimeAsyncCompilation checks Repl.Core and Repl.Defaults both ways: with the switch, their async methods are runtime async; without it, they keep compiler state machines, as the packages must. - A Runtime Async CI job builds with the switch, checks that it took effect, and runs every net11.0 test project. It does not block merging. - docs/dotnet-11.md tells applications they can opt in for their own code unless they run in the browser. Closes #188
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Closes #188.
Runtime async is no longer a preview feature on
net11.0, but Repl's packages cannot use it: .NET 11 WebAssembly runs on Mono, which does not support it. Microsoft keeps its own NuGet packages off it for that reason (dotnet/runtime#125406, dotnet/aspnetcore#66200), and Repl runs in the browser. So this tests Repl in that mode without shipping it.Changes
src/Directory.Build.props:-p:ReplRuntimeAsync=true(off by default) compilesnet11.0and later withruntime-async=onand definesREPL_RUNTIME_ASYNC. Packing fails when the property is set.Given_RuntimeAsyncCompilation(Repl.Tests) inspects every method ofRepl.CoreandRepl.Defaults. With the switch, some carryMethodImplAttributes.Asyncand none has a compiler state machine. Without it, the reverse holds on both targets, so the assemblies thatBuild, Test, Packtests and packs cannot be runtime async.Runtime Async (non-blocking)job builds with the switch, runs the switch test with--minimum-expected-tests 1so a green job always means runtime-async binaries, then runs everysrc/Repl.*Testsproject onnet11.0and uploads the TRX files. It hascontinue-on-errorand never packs.docs/dotnet-11.mdexplains why the packages stay off, and that an application not running in the browser can opt in for its own code.docs/publishing.mddescribes the guards and their one gap: a build with the switch followed bypack --no-buildwithout it.Verification
net11.0when runtime async is turned on without the switch, and passes in the default and switch builds.net11.0tests pass through the same loop as the job (2805, 0 failed). No Repl assumption broke under runtime async.dotnet pack -p:ReplRuntimeAsync=truefails with the guard's message. The default pack produces the 12 packages, and package validation against 0.12.1 passes.DefineConstants.Not covered
The packaging test checks
Repl.CoreandRepl.Defaultsonly. A<Features>runtime-async=on</Features>added directly to another package's project file would not be caught by it.