Skip to content

[0.81] Remove legacy Coroutines TS compiler support - #16586

Merged
Vladimir Morozov (vmoroz) merged 1 commit into
microsoft:0.81-stablefrom
vmoroz:PR/0.81-remove-legacy-coroutine-fallbacks
Nov 7, 2026
Merged

Vladimir Morozov (vmoroz) merged 1 commit into
microsoft:0.81-stablefrom
vmoroz:PR/0.81-remove-legacy-coroutine-fallbacks

Conversation

@vmoroz

@vmoroz Vladimir Morozov (vmoroz) commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Description

Type of Change

Erase all that don't apply.

  • Bug fix (non-breaking change which fixes an issue)
  • This change requires a documentation update

Why

Backport #16577 to 0.81. This branch already requires C++20 and VS2026 and contains the prerequisite WinRT async conversions, so the Coroutines TS compatibility path is no longer needed.

What

  • Standard coroutines. Remove the six guarded /await injections and use std::coroutine_handle unconditionally in WinRTWebSocketResource2. Preserve Paper/Fabric behavior and the ordinary promise-backed std::future API.
  • Build guidance. Document standard coroutine usage and add a patch change file for the stable branch. Compiler requirements are unchanged.

Screenshots

Not applicable; no UI changes.

Testing

Paper and Fabric each passed the C++20 WebSocket-header/WinRT-adapter smoke (100 async completions) and 1,267 Mso tests. All five affected native projects evaluate to C++20 without /await in both modes.

  • yarn format - passed.
  • yarn beachball check --branch upstream/0.81-stable --no-fetch - passed.
  • msbuild vnext\Mso.UnitTests\Mso.UnitTests.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:RnwNewArch=false /p:CL_MPCount=4 /m:4 /nr:false /v:minimal - passed.
  • msbuild vnext\Mso.UnitTests\Mso.UnitTests.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:RnwNewArch=true /p:CL_MPCount=4 /m:4 /nr:false /v:minimal - passed.
  • vnext\target\x64\Debug\Mso.UnitTests\Mso.UnitTests.exe - passed after each build, 1,267 tests per mode.
  • yarn install --immutable - failed: package-feed authentication rejected anonymous access to @microsoft/api-extractor@7.60.0 (YN0041). Full RNW builds were not run with mismatched dependencies.
  • yarn lint:fix - blocked by missing depcheck in the unaligned local dependency installation.

Changelog

Should this change be included in the release notes: no

Use C++20 standard coroutines without the legacy /await flag.

Microsoft Reviewers: Open in CodeFlow

Backport microsoft#16577, adapting the guarded compiler flags and WinRTWebSocketResource2 header while preserving Paper and Fabric behavior.

(cherry picked from commit bfa7a8e)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 23:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block the legacy coroutine-support cleanup.

No open issues 🎉

What changed in this PR

Backports the removal of legacy Coroutines TS support to 0.81, aligning native builds with the branch’s existing C++20 requirement without changing compiler requirements.

Changes:

  • Use std::coroutine_handle unconditionally in the WebSocket task sequencer.
  • Remove six guarded /await compiler-option injections.
  • Document standard coroutine usage and add a patch change file.
File Description
vnext/​Shared/​Networking/​WinRTWebSocketResource.h Includes <coroutine> and removes the experimental handle fallback.
vnext/​PropertySheets/​React.Cpp.props Removes the shared legacy /await option.
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 legacy /await.
change/​react-native-windows-7bd37026-8bf0-4923-8422-78b487d1f6d7.json Records the coroutine cleanup as a patch change.

Review effort: Balanced

@vmoroz
Vladimir Morozov (vmoroz) merged commit 94c5a3f into microsoft:0.81-stable Nov 7, 2026
36 checks passed
@vmoroz
Vladimir Morozov (vmoroz) deleted the PR/0.81-remove-legacy-coroutine-fallbacks branch November 7, 2026 00:45
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.

3 participants