Skip to content

[0.85] Remove legacy Coroutines TS compiler support - #16585

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

Vladimir Morozov (vmoroz) merged 1 commit into
microsoft:0.85-stablefrom
vmoroz:PR/0.85-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.85. 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 /await injections and use std::coroutine_handle unconditionally, with an explicit <coroutine> include. Existing compiler requirements and coroutine behavior are unchanged.
  • Build guidance. Document standard coroutine usage and add a patch change file for the stable branch.

Screenshots

Not applicable; no UI changes.

Testing

The C++20 WebSocket-header/WinRT-adapter smoke passed 100 async completions. All five affected native projects evaluate to C++20 without /await.

  • yarn format - passed.
  • yarn beachball check --branch upstream/0.85-stable --no-fetch - passed.
  • msbuild vnext\Mso.UnitTests\Mso.UnitTests.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:CL_MPCount=4 /m:4 /nr:false /v:minimal - passed.
  • vnext\target\x64\Debug\Mso.UnitTests\Mso.UnitTests.exe - passed, 1,267 tests.
  • 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 - failed in unchanged vnext/types/Libraries/Image/Image.d.ts on duplicate getSize and getSizeWithHeaders declarations.

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 without changing compiler requirements. Use a patch change file for the stable branch.

(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:11

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 were identified for the C++20 coroutine cleanup.

No open issues 🎉

What changed in this PR

Backports the removal of legacy Coroutines TS support to React Native Windows 0.85, aligning native builds with the branch’s existing C++20 requirements.

Changes:

  • Removes six conditional /await compiler-flag injections.
  • Uses std::coroutine_handle unconditionally and explicitly includes <coroutine>.
  • Documents standard coroutine usage and adds a patch change file.
File Description
vnext/​Shared/​Networking/​WinRTWebSocketResource.h Replaces conditional coroutine support with the standard C++20 type.
vnext/​PropertySheets/​React.Cpp.props Removes the shared legacy /await flag.
vnext/​Mso.UnitTests/​Mso.UnitTests.vcxproj Removes /await and its obsolete comment.
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 obsolete comment.
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 warns against legacy /await.
change/​react-native-windows-e086a888-70b3-4f50-b90d-95812a144a0f.json Records the cleanup as a patch release change.

Review effort: Balanced

@vmoroz
Vladimir Morozov (vmoroz) merged commit 3e0429e into microsoft:0.85-stable Nov 7, 2026
32 checks passed
@vmoroz
Vladimir Morozov (vmoroz) deleted the PR/0.85-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