Skip to content

ci: test Repl compiled with runtime async in a non-blocking job - #215

Merged
carldebilly merged 1 commit into
mainfrom
dev/cdb/net11-runtime-async
Nov 18, 2026
Merged

carldebilly merged 1 commit into
mainfrom
dev/cdb/net11-runtime-async

Conversation

@carldebilly

@carldebilly carldebilly commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

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) compiles net11.0 and later with runtime-async=on and defines REPL_RUNTIME_ASYNC. Packing fails when the property is set.
  • Given_RuntimeAsyncCompilation (Repl.Tests) inspects every method of Repl.Core and Repl.Defaults. With the switch, some carry MethodImplAttributes.Async and none has a compiler state machine. Without it, the reverse holds on both targets, so the assemblies that Build, Test, Pack tests and packs cannot be runtime async.
  • CI: a Runtime Async (non-blocking) job builds with the switch, runs the switch test with --minimum-expected-tests 1 so a green job always means runtime-async binaries, then runs every src/Repl.*Tests project on net11.0 and uploads the TRX files. It has continue-on-error and never packs.
  • Docs: docs/dotnet-11.md explains why the packages stay off, and that an application not running in the browser can opt in for its own code. docs/publishing.md describes the guards and their one gap: a build with the switch followed by pack --no-build without it.

Verification

  • TDD: the packaging test fails on net11.0 when runtime async is turned on without the switch, and passes in the default and switch builds.
  • Default build: 0 warnings. All tests pass on both targets: 5598, 0 failed.
  • Switch build: 0 warnings. All net11.0 tests pass through the same loop as the job (2805, 0 failed). No Repl assumption broke under runtime async.
  • dotnet pack -p:ReplRuntimeAsync=true fails with the guard's message. The default pack produces the 12 packages, and package validation against 0.12.1 passes.
  • Toggling the switch recompiles incrementally, because it changes DefineConstants.

Not covered

The packaging test checks Repl.Core and Repl.Defaults only. A <Features>runtime-async=on</Features> added directly to another package's project file would not be caught by it.


Devin Review

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
@carldebilly carldebilly added this to the 0.13.0 milestone Nov 18, 2026
@carldebilly carldebilly added the internal Tests, CI or refactoring with no consumer-visible change label Nov 18, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T02:52:38.105444Z 018803f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@carldebilly
carldebilly merged commit a8310ac into main Nov 18, 2026
20 checks passed
@carldebilly
carldebilly deleted the dev/cdb/net11-runtime-async branch November 18, 2026 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Tests, CI or refactoring with no consumer-visible change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: add a non-blocking job that runs the tests with Runtime Async

1 participant