Skip to content

Fix Windows release build failure on latest MSVC toolchain#28

Merged
jiacai2050 merged 2 commits into
mainfrom
copilot/fix-github-actions-build-app
Jul 1, 2026
Merged

Fix Windows release build failure on latest MSVC toolchain#28
jiacai2050 merged 2 commits into
mainfrom
copilot/fix-github-actions-build-app

Conversation

Copilot AI commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

The Windows release job started failing on windows-latest during flutter build windows. The breakage came from transitive Windows plugins (local_auth_windows, permission_handler_windows) hitting MSVC's new hard error for deprecated <experimental/coroutine> usage.

  • Root cause

    • Current GitHub Actions Windows runners ship an MSVC/STL version that rejects deprecated experimental coroutine support used by plugin native code.
    • The later Compress-Archive failure in the job was secondary; the build output was never produced.
  • Change

    • Add a top-level Windows compile definition in windows/CMakeLists.txt:
      • _SILENCE_EXPERIMENTAL_COROUTINE_DEPRECATION_WARNINGS
    • This applies to plugin subprojects built through the app's CMake graph, avoiding direct edits to generated plugin files or dependency sources.
  • Why here

    • The failing plugins are added as CMake subdirectories from Flutter's generated Windows plugin wiring, so a single definition at the app level propagates to those targets.
# windows/CMakeLists.txt
add_definitions(-DUNICODE -D_UNICODE)
add_compile_definitions(_SILENCE_EXPERIMENTAL_COROUTINE_DEPRECATION_WARNINGS)

Copilot AI changed the title [WIP] Fix failing GitHub Actions job build-app on Windows Fix Windows release build failure on latest MSVC toolchain Jul 1, 2026
Copilot AI requested a review from jiacai2050 July 1, 2026 15:03
@jiacai2050
jiacai2050 marked this pull request as ready for review July 1, 2026 15:16
Copilot AI review requested due to automatic review settings July 1, 2026 15:16
@jiacai2050
jiacai2050 merged commit 6986b17 into main Jul 1, 2026
9 checks passed
@jiacai2050
jiacai2050 deleted the copilot/fix-github-actions-build-app branch July 1, 2026 15:17

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.

Pull request overview

This PR addresses a Windows release build failure on windows-latest by adding a global Windows CMake compile definition intended to silence MSVC/STL deprecation diagnostics triggered by transitive Flutter Windows plugins.

Changes:

  • Add _SILENCE_EXPERIMENTAL_COROUTINE_DEPRECATION_WARNINGS via add_compile_definitions(...) in the top-level Windows CMake configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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