From c03132d42332fd870b9b8f885089ccb1121c10da Mon Sep 17 00:00:00 2001 From: Levi Date: Tue, 13 Oct 2026 20:26:36 +0800 Subject: [PATCH] fix(windows): scope MSVC coroutine compatibility to affected plugins --- .github/workflows/test.yml | 1 - ui/flutter/pubspec.lock | 35 +++++++++++++++---------------- ui/flutter/pubspec.yaml | 23 +++++++------------- ui/flutter/windows/CMakeLists.txt | 11 ++++++++++ 4 files changed, 36 insertions(+), 34 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6f8ebf33..0b87348d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -160,7 +160,6 @@ jobs: build-desktop: strategy: - fail-fast: false matrix: include: - os: windows-2022 diff --git a/ui/flutter/pubspec.lock b/ui/flutter/pubspec.lock index b88acceb..fda93b4a 100644 --- a/ui/flutter/pubspec.lock +++ b/ui/flutter/pubspec.lock @@ -458,8 +458,8 @@ packages: dependency: "direct main" description: path: flutter_inappwebview - ref: f34db21c63102e05b0bad322989123ccd6403ed0 - resolved-ref: f34db21c63102e05b0bad322989123ccd6403ed0 + ref: d579215760e1c1e58a4ff7601a6055b5e6adf8e8 + resolved-ref: d579215760e1c1e58a4ff7601a6055b5e6adf8e8 url: "https://github.com/GopeedLab/flutter_inappwebview.git" source: git version: "6.1.5" @@ -467,8 +467,8 @@ packages: dependency: "direct overridden" description: path: flutter_inappwebview_android - ref: f34db21c63102e05b0bad322989123ccd6403ed0 - resolved-ref: f34db21c63102e05b0bad322989123ccd6403ed0 + ref: d579215760e1c1e58a4ff7601a6055b5e6adf8e8 + resolved-ref: d579215760e1c1e58a4ff7601a6055b5e6adf8e8 url: "https://github.com/GopeedLab/flutter_inappwebview.git" source: git version: "1.1.3" @@ -484,8 +484,8 @@ packages: dependency: "direct overridden" description: path: flutter_inappwebview_ios - ref: f34db21c63102e05b0bad322989123ccd6403ed0 - resolved-ref: f34db21c63102e05b0bad322989123ccd6403ed0 + ref: d579215760e1c1e58a4ff7601a6055b5e6adf8e8 + resolved-ref: d579215760e1c1e58a4ff7601a6055b5e6adf8e8 url: "https://github.com/GopeedLab/flutter_inappwebview.git" source: git version: "1.1.2" @@ -493,8 +493,8 @@ packages: dependency: "direct overridden" description: path: flutter_inappwebview_macos - ref: f34db21c63102e05b0bad322989123ccd6403ed0 - resolved-ref: f34db21c63102e05b0bad322989123ccd6403ed0 + ref: d579215760e1c1e58a4ff7601a6055b5e6adf8e8 + resolved-ref: d579215760e1c1e58a4ff7601a6055b5e6adf8e8 url: "https://github.com/GopeedLab/flutter_inappwebview.git" source: git version: "1.1.2" @@ -502,8 +502,8 @@ packages: dependency: "direct overridden" description: path: flutter_inappwebview_platform_interface - ref: f34db21c63102e05b0bad322989123ccd6403ed0 - resolved-ref: f34db21c63102e05b0bad322989123ccd6403ed0 + ref: d579215760e1c1e58a4ff7601a6055b5e6adf8e8 + resolved-ref: d579215760e1c1e58a4ff7601a6055b5e6adf8e8 url: "https://github.com/GopeedLab/flutter_inappwebview.git" source: git version: "1.3.0+1" @@ -516,13 +516,12 @@ packages: source: hosted version: "1.1.2" flutter_inappwebview_windows: - dependency: "direct overridden" + dependency: transitive description: - path: flutter_inappwebview_windows - ref: f34db21c63102e05b0bad322989123ccd6403ed0 - resolved-ref: f34db21c63102e05b0bad322989123ccd6403ed0 - url: "https://github.com/GopeedLab/flutter_inappwebview.git" - source: git + name: flutter_inappwebview_windows + sha256: "8b4d3a46078a2cdc636c4a3d10d10f2a16882f6be607962dbfff8874d1642055" + url: "https://pub.dev" + source: hosted version: "0.6.0" flutter_launcher_icons: dependency: "direct dev" @@ -1107,8 +1106,8 @@ packages: dependency: "direct overridden" description: path: permission_handler_windows - ref: ffcca00fb0ae2543f5bd6c83125ffba5755d3aa3 - resolved-ref: ffcca00fb0ae2543f5bd6c83125ffba5755d3aa3 + ref: "35fc72c30262b9b49e1965b48a7524b44ba9daa7" + resolved-ref: "35fc72c30262b9b49e1965b48a7524b44ba9daa7" url: "https://github.com/monkeyWie/flutter-permission-handler.git" source: git version: "0.2.1" diff --git a/ui/flutter/pubspec.yaml b/ui/flutter/pubspec.yaml index a583e2c4..6c485524 100644 --- a/ui/flutter/pubspec.yaml +++ b/ui/flutter/pubspec.yaml @@ -82,38 +82,32 @@ dependencies: go_router: ^16.2.1 dependency_overrides: - # Public persistent-profile/proxy APIs and Windows C++20 build compatibility. - # Keep all fork packages on one commit. + # Public persistent-profile and proxy APIs; keep all packages on one commit. flutter_inappwebview: git: url: https://github.com/GopeedLab/flutter_inappwebview.git - ref: f34db21c63102e05b0bad322989123ccd6403ed0 + ref: d579215760e1c1e58a4ff7601a6055b5e6adf8e8 path: flutter_inappwebview flutter_inappwebview_platform_interface: git: url: https://github.com/GopeedLab/flutter_inappwebview.git - ref: f34db21c63102e05b0bad322989123ccd6403ed0 + ref: d579215760e1c1e58a4ff7601a6055b5e6adf8e8 path: flutter_inappwebview_platform_interface flutter_inappwebview_macos: git: url: https://github.com/GopeedLab/flutter_inappwebview.git - ref: f34db21c63102e05b0bad322989123ccd6403ed0 + ref: d579215760e1c1e58a4ff7601a6055b5e6adf8e8 path: flutter_inappwebview_macos flutter_inappwebview_ios: git: url: https://github.com/GopeedLab/flutter_inappwebview.git - ref: f34db21c63102e05b0bad322989123ccd6403ed0 + ref: d579215760e1c1e58a4ff7601a6055b5e6adf8e8 path: flutter_inappwebview_ios flutter_inappwebview_android: git: url: https://github.com/GopeedLab/flutter_inappwebview.git - ref: f34db21c63102e05b0bad322989123ccd6403ed0 + ref: d579215760e1c1e58a4ff7601a6055b5e6adf8e8 path: flutter_inappwebview_android - flutter_inappwebview_windows: - git: - url: https://github.com/GopeedLab/flutter_inappwebview.git - ref: f34db21c63102e05b0bad322989123ccd6403ed0 - path: flutter_inappwebview_windows # Prevent a native Windows crash when the push notification service is unavailable. # Keep this fork until https://github.com/MaikuB/flutter_local_notifications/pull/2813 is merged and released. flutter_local_notifications: @@ -128,12 +122,11 @@ dependency_overrides: path: flutter_local_notifications_windows # Upstream initializes a Windows Geolocator when the plugin registers, which # makes Windows report location access even when the app never requests it. - # Also removes legacy /await so the plugin uses standard C++20 coroutines. - # Keep this fork until the location-access and build fixes are released upstream. + # Keep this fork until https://github.com/Baseflow/flutter-permission-handler/issues/1394 is fixed and released. permission_handler_windows: git: url: https://github.com/monkeyWie/flutter-permission-handler.git - ref: ffcca00fb0ae2543f5bd6c83125ffba5755d3aa3 + ref: 35fc72c30262b9b49e1965b48a7524b44ba9daa7 path: permission_handler_windows dev_dependencies: diff --git a/ui/flutter/windows/CMakeLists.txt b/ui/flutter/windows/CMakeLists.txt index 60748efd..dba02eff 100644 --- a/ui/flutter/windows/CMakeLists.txt +++ b/ui/flutter/windows/CMakeLists.txt @@ -57,6 +57,17 @@ add_subdirectory("runner") # them to the application. include(flutter/generated_plugins.cmake) +# Temporary compatibility for legacy coroutine headers on MSVC 14.51. +# Remove once both Windows plugins use standard coroutines. +if(MSVC) + foreach(plugin IN ITEMS flutter_inappwebview_windows_plugin permission_handler_windows_plugin) + if(TARGET ${plugin}) + target_compile_definitions(${plugin} PRIVATE + _SILENCE_EXPERIMENTAL_COROUTINE_DEPRECATION_WARNINGS) + endif() + endforeach() +endif() + # === Installation === # Support files are copied into place next to the executable, so that it can