Repository navigation
Remove legacy Coroutines TS compiler support - #16577
Merged
Vladimir Morozov (vmoroz) merged 1 commit intoNov 5, 2026
Merged
Vladimir Morozov (vmoroz) merged 1 commit into
Vladimir Morozov (vmoroz) merged 1 commit into
Conversation
Use C++20 coroutine handles consistently and remove obsolete /await flags from native projects. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the migration from legacy Coroutines TS support to standard C++20 coroutines.
No open issues 🎉
What changed in this PR
Removes legacy Coroutines TS support from React Native Windows, aligning native builds with the existing C++20 requirement and the earlier replacement of std::future coroutine returns.
Changes:
- Removes conditional
/awaitflags from shared build settings and native projects. - Uses
std::coroutine_handleunconditionally with an explicit<coroutine>include. - Documents standard coroutine usage and adds a prerelease change entry.
| File | Description |
|---|---|
| vnext/Shared/Networking/WinRTWebSocketResource.h | Replaces the experimental fallback with standard coroutine handles. |
| vnext/PropertySheets/React.Cpp.props | Removes the shared legacy /await flag. |
| vnext/Mso.UnitTests/Mso.UnitTests.vcxproj | Removes /await and its comment entry. |
| vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj | Removes /await from the native runtime project. |
| vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj | Removes /await and its comment entry. |
| vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj | Removes /await from C++ unit tests. |
| vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj | Removes /await from Desktop unit tests. |
| docs/building-rnw.md | Documents C++20 coroutines and advises against /await. |
| change/react-native-windows-b2e3a4fc-d1d2-4f1d-b2b6-af7b5a170381.json | Records the coroutine build change for prerelease versioning. |
Review effort: Balanced
acoates-ms
approved these changes
Nov 5, 2026
Vladimir Morozov (vmoroz)
deleted the
PR/remove-legacy-coroutine-fallbacks
branch
November 5, 2026 22:05
This was referenced Nov 6, 2026
Vladimir Morozov (vmoroz)
added a commit
that referenced
this pull request
Nov 7, 2026
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.
Description
Type of Change
Erase all that don't apply.
Why
C++20 is already required, and the remaining
std::futurecoroutine returns were replaced in #16170. The legacy Coroutines TS build flags and experimental coroutine-handle fallback are no longer needed.Related: #12331.
What
/awaitfrom shared native build settings and test projects. Usestd::coroutine_handlewith an explicit<coroutine>include so every supported build uses the same coroutine implementation./await.Screenshots
Not applicable; no UI changes.
Testing
All 1,786 native tests passed. The Desktop build, lint, formatting, and change-file checks passed. All affected New Architecture native projects built, but the full solution failed in the unchanged CsWinRT project's automatic Yarn restore: anonymous feed access to
@microsoft/api-extractor@7.60.0was rejected (YN0041).Exact local commands and results
yarn lint:fix- passed.yarn format- passed.yarn beachball check --branch upstream/main --no-fetch- passed.msbuild vnext\ReactWindows-Desktop.sln /t:React_Windows_Desktop_UnitTests /p:Configuration=Debug /p:Platform=x64 /p:CL_MPCount=4 /m:4 /nr:false /v:minimal- passed.msbuild vnext\Microsoft.ReactNative.NewArch.sln /p:Configuration=Debug /p:Platform=x64 /p:CL_MPCount=4 /m:4 /nr:false /v:minimal- failed only at the CsWinRT restore described above; production RNW and both native test executables built.vnext\target\x64\Debug\Mso.UnitTests\Mso.UnitTests.exe- passed, 1,267 tests.vnext\target\x64\Debug\Microsoft.ReactNative.Cxx.UnitTests\Microsoft.ReactNative.Cxx.UnitTests.exe- passed, 365 tests.vnext\target\x64\Debug\Microsoft.ReactNative.IntegrationTests\Microsoft.ReactNative.IntegrationTests.exe- passed, 149 tests.vstest.console.exe vnext\target\x64\Debug\React.Windows.Desktop.UnitTests\React.Windows.Desktop.UnitTests.dll /TestCaseFilter:FullyQualifiedName~WinRTWebSocketResourceUnitTest /InIsolation "/Logger:trx;LogFileName=coroutine-websocket.trx" /ResultsDirectory:vnext\target\x64\Debug\TestResults\Coroutines- passed, all 5 WebSocket tests executed.Changelog
Should this change be included in the release notes: no
Use C++20 standard coroutines without the legacy
/awaitflag.Microsoft Reviewers: Open in CodeFlow