Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 18, 2025

Enables runtime async support by setting the CoreCLR configuration default and enabling async tests, without forcing the runtime-async=on compiler feature across all library code.

This enables all the runtime tests, but not the libraries tests. This allows us to opt-in libraries tests one-by-one and confirm no regressions.

Changes

  • src/coreclr/inc/clrconfigvalues.h: Set RuntimeAsync default to 1 (enabled)
  • src/tests/async/Directory.Build.targets: Remove DisableProjectBuild block that prevented async test compilation

Copilot AI changed the title [WIP] Enable runtime async support without compiler flag Enable runtime async without library-wide compiler flag Nov 18, 2025
Copilot AI requested a review from agocke November 18, 2025 07:49
@agocke agocke changed the title Enable runtime async without library-wide compiler flag Enable runtime async config switch by default Nov 18, 2025
@agocke agocke marked this pull request as ready for review November 18, 2025 18:46
@agocke agocke requested review from VSadov and jakobbotsch November 18, 2025 18:46
@agocke
Copy link
Member

agocke commented Nov 18, 2025

/azp list

Copilot AI review requested due to automatic review settings November 18, 2025 18:52
@azure-pipelines
Copy link

CI/CD Pipelines for this repository:

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables runtime async support by default in CoreCLR and activates the associated test suite. The change flips the default configuration value for RuntimeAsync from disabled (0) to enabled (1), and removes a blocking PropertyGroup that prevented async test compilation.

Key Changes

  • Sets the RuntimeAsync configuration default to 1 (enabled) in the CoreCLR configuration system
  • Removes the blanket DisableProjectBuild property that previously prevented all async tests from being built

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/coreclr/inc/clrconfigvalues.h Changes the default value of the UNSUPPORTED_RuntimeAsync configuration from 0 to 1, enabling runtime async method support by default
src/tests/async/Directory.Build.targets Removes the PropertyGroup that disabled async test builds, allowing tests to compile and run for supported configurations (CoreCLR) while maintaining exclusions for mono, nativeaot, and wasm

@agocke
Copy link
Member

agocke commented Nov 18, 2025

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@agocke
Copy link
Member

agocke commented Nov 18, 2025

@jkotas Gave some good feedback offline: we still have some TODOs in the code that will cause breaking changes if this is enabled.

We need to clean those up before we merge. @VSadov do you have an up-to-date list/tracking issue for these?

@jkotas
Copy link
Member

jkotas commented Nov 18, 2025

#115094 is the tracking issue.

// TODO: (async) the index is uint16 and can potentially overflow. This needs to be more robust.
or #114675 (comment) are examples of real bugs tracked by these TODOs that need to be fixed (and regression tests added).

@VSadov
Copy link
Member

VSadov commented Nov 18, 2025

There are 26 TODO: (async) comments in the VM right now. Some are just reminders to review the scenario more closely, some are actual issues. We need to get rid of these TODOs one way or another. And since we are close to have Libraries pass with async, it is time to deal with TODOs.

I think a good way to work on this in parallel is logging bugs on each of these (or on areas with TODOs if they are in the same area). Then we can assign the bugs around.

@VSadov
Copy link
Member

VSadov commented Nov 18, 2025

As an example - log issues like: #121754

If the approach sounds reasonable, I will go and make issues for other TODOs.

@VSadov
Copy link
Member

VSadov commented Nov 18, 2025

An example of a tracking issue for something, that I do not think is blocking.
In this case it is the part that we do not yet supporting async methods in PGO.

#121755

I think we should just have tracking issues for these kind of NYIs, not TODOs.

@jkotas
Copy link
Member

jkotas commented Nov 18, 2025

I think we should just have tracking issues for these kind of NYIs,

Yes, tracking issues for perf improvements are fine. I am worried about fixing security issues (the integer overflow example above) and observable behavior changes (the COM interop example above) before we flip the switch.

@VSadov
Copy link
Member

VSadov commented Nov 18, 2025

I think we should just have tracking issues for these kind of NYIs,

Yes, tracking issues for perf improvements are fine. I am worried about fixing security issues (the integer overflow example above) and observable behavior changes (the COM interop example above) before we flip the switch.

Yes, if there is a chance that a TODOs may be hiding a functional regression, I'll keep TODO: (async) in the code.

I will still open issues on individual (or groups of TODOs, when in the same area) - that is just to coordinate when/who is fixing them.

@VSadov
Copy link
Member

VSadov commented Nov 18, 2025

I will still open issues on individual (or groups of TODOs, when in the same area) - that is just to coordinate when/who is fixing them.

This was done.
I have logged 6 issues total and they are referenced from the parent workitem: #115094

The biggest one, IMO, is the COM interop in the presence of runtime async. It may even need to be split further, - I am not familiar with the area enough to tell if COM-to-CLR and CLR-to-COM are here unrelated and can or need to be handled separately.
Not sure if we need to do something with WinRT or it is just a subset.

@VSadov
Copy link
Member

VSadov commented Dec 16, 2025

I think at this point we are just waiting for #122466 to be completed.

There are also 3 TODOs in stub generating helpers about odd-looking pattern and whether it is the best practice - #121754 .
I do not think those are blocking.

@jkotas
Copy link
Member

jkotas commented Dec 17, 2025

I think at this point we are just waiting for #122466 to be completed.

I would be fine with merging this even before #122466 completes. The remaining TODOs do not look critical.

Copilot AI and others added 2 commits December 17, 2025 12:46
Co-authored-by: agocke <515774+agocke@users.noreply.github.com>
@VSadov VSadov force-pushed the copilot/enable-runtime-async-support branch from 77f0af6 to 5be29c0 Compare December 17, 2025 20:48
@VSadov VSadov merged commit 1bee5b1 into main Dec 17, 2025
104 checks passed
@VSadov VSadov deleted the copilot/enable-runtime-async-support branch December 17, 2025 23:19
@pavelsavara
Copy link
Member

pavelsavara commented Dec 19, 2025

This PR breaks browser/interp probably until we remove the temporary signature detection

To unblock us, we will turn asyncv2 for browser off in #122495
That PR also brings first CI smoke test for CoreCLR/WASM😅

@jkotas
Copy link
Member

jkotas commented Dec 19, 2025

This PR breaks browser/interp probably until we remove the #121064

The temporary signature detection should work just fine with RuntimeAsync=1. I think this suggests that there is a bug exposed by setting RuntimeAsync=1. Wasm just got unlucky to hit this bug first. Opened #122672 on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants