Enable runtime-async in CoreCLR System.Private.CoreLib#126594
Conversation
…scv64, loongarch64, and Mono Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/46f839bd-54df-446d-8b31-41b32d813c8c Co-authored-by: agocke <515774+agocke@users.noreply.github.com>
|
Tagging subscribers to this area: @agocke, @dotnet/runtime-infrastructure |
There was a problem hiding this comment.
Pull request overview
Enables the Roslyn runtime-async=on feature flag when building CoreCLR’s System.Private.CoreLib, aligning CoreCLR CoreLib behavior with existing runtime-async enablement elsewhere while excluding known-unsupported architectures and Mono builds.
Changes:
- Add
runtime-async=ontoFeaturesfor CoreCLRSystem.Private.CoreLibbuilds. - Gate the feature behind MSBuild conditions to exclude
riscv64,loongarch64, andRuntimeFlavor=Mono.
VSadov
left a comment
There was a problem hiding this comment.
LGTM. Hopefully no surprises when tests get to run.
src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj
Outdated
Show resolved
Hide resolved
Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
|
Are we still in the window of preview3 so that this can be backported to it? |
src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj
Outdated
Show resolved
Hide resolved
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
🤖 Copilot Code Review — PR #126594Note This review was generated by GitHub Copilot. Holistic AssessmentMotivation: Justified. Runtime-async ( Approach: The intent is correct but the latest commit (9865b9d, co-authored with Summary: Detailed Findings❌ Configuration Restriction —
|
| Location | Configuration restriction? |
|---|---|
NativeAOT SPCL (src/coreclr/nativeaot/.../System.Private.CoreLib.csproj:48-49) |
None — all configurations |
Libraries (src/libraries/Directory.Build.targets:140-145) |
None — all configurations |
Tests (eng/testing/tests.targets:12-15) |
None — all configurations |
| CoreCLR SPCL (this PR) | Release only ❌ |
This appears to be an unintended side effect of applying @am11's suggestion to delete the architecture-conditional PropertyGroup. The deletion removed the </PropertyGroup> that closed the Release group and the <PropertyGroup Condition="..."> that opened the feature group — merging the <Features> line into the Release block.
Fix: Move <Features> into its own unconditional PropertyGroup, or add it to the existing unconditional PropertyGroup that follows:
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<Optimize Condition="'$(Optimize)' == ''">true</Optimize>
</PropertyGroup>
<PropertyGroup>
<Features>$(Features);runtime-async=on</Features>
</PropertyGroup>⚠️ NativeAOT SPCL Inconsistency — still has riscv64/loongarch64 exclusions
If the riscv64 and loongarch64 runtime-async support is indeed complete (per @am11's review comment citing merged PRs #125446 and #125114), then the same exclusion removal should also be applied to the NativeAOT SPCL at src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj (lines 45-50), which still has:
<!-- Enable runtime async for Native AOT -->
<!-- RISC-V: https://github.com/dotnet/runtime/issues/124934 -->
<!-- LoongArch: https://github.com/dotnet/runtime/issues/124935 -->
<PropertyGroup Condition="'$(TargetArchitecture)' != 'riscv64' and '$(TargetArchitecture)' != 'loongarch64'">
<Features>$(Features);runtime-async=on</Features>
</PropertyGroup>Without updating NativeAOT SPCL, we end up with:
- CoreCLR SPCL: runtime-async on all architectures ✅
- NativeAOT SPCL: runtime-async on all except riscv64/loongarch64 ❌
Note: tracking issues #124934 and #124935 are still open with unchecked items (including NativeAOT support). If the architecture work is not fully complete for NativeAOT, this inconsistency may be intentional — but it should be explicitly noted. Either way, the CoreCLR SPCL change should be made consistently with the NativeAOT SPCL.
⚠️ Stale Approval — VSadov's LGTM was on commit 1
@VSadov approved on the initial commit (c096559) which had Mono and architecture exclusions. The code has changed substantially since then (Mono exclusion removed per @MichalStrehovsky's feedback, architecture exclusions removed per @am11's feedback, and the unintended Release-only restriction). The current code is meaningfully different from what was approved.
💡 PR Description — Stale
The PR description still shows the original PropertyGroup with RuntimeFlavor != 'Mono' and architecture exclusions, and lists "riscv64 excluded" / "loongarch64 excluded" / "Mono flavor excluded" as features. None of these reflect the current state of the code. Consider updating.
Generated by Copilot Code Review workflow for PR #126594
Generated by Code Review for issue #126594 · ◷
|
/ba-g failures are networking |
|
/backport to release/11.0-preview3 |
|
Started backporting to |
Description
Runtime-async was enabled for
src/libraries(non-mobile/wasm) but was missing from the CoreCLRSystem.Private.CoreLib. This adds theruntime-async=onfeature flag tosrc/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj, matching the existing NativeAOT pattern with architecture and runtime flavor exclusions: