-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Steps to reproduce
Hi, I work on Microsoft Visual C++ testing, after our maintainer acknowledged firebase/flutterfire#16536 and it was being fixed in firebase/flutterfire#16840, we proceeded with further testing and building with /permissive- and /std:c++latest and encountered several compilation errors.
Note: Feel free to close this issue if /permissive- or /std:c++latest are not supported.
- Open x64 native tools command prompt for VS2022.
- set VSCMD_SKIP_SENDTELEMETRY=1 & "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64 & set _CL_= /permissive-
- git clone https://github.com/firebase/flutterfire
- cd firebase\flutterfire\packages\firebase_storage\firebase_storage\example
- flutter pub get 2>&1
- flutter build windows --verbose 2>&1
Expected results
Build successfully
Actual results
firebase_storage\example\windows\flutter\ephemeral\cpp_client_wrapper\include\flutter/encodable_value.h(199,60): note: the template instantiation context (the oldest one first) is
\firebase_storage\example\windows\flutter\ephemeral\.plugin_symlinks\file_selector_windows\windows\file_selector_plugin.cpp(225,39): note: see reference to function template instantiation 'flutter::EncodableValue::EncodableValue<HRESULT>(T &&) noexcept' being compiled
with
[
T=HRESULT
]
\firebase_storage\example\windows\flutter\ephemeral\.plugin_symlinks\file_selector_windows\windows\file_selector_plugin.cpp(257,41): note: see reference to function template instantiation 'flutter::EncodableValue::EncodableValue<HRESULT>(T &&) noexcept' being compiled
with
[
T=HRESULT
]Code sample
Apologies for being unable to locate the source code in any repository.
This line of code can be found on file_selector_plugin.cpp(225,39) and file_selector_plugin.cpp(257,41)
if (!SUCCEEDED(dialog.last_result())) {
return FlutterError("System error", "Could not create dialog",
EncodableValue(dialog.last_result()));
}Simply changing EncodableValue(dialog.last_result())); to flutter::CustomEncodableValue(dialog.last_result())); will resolve the compilation issue.
Screenshots or Video
Logs
/permissive- Build log: Build (1).log
/std:c++latest Build log: Build (2).log
Note: Feel free to close this issue if /permissive- or /std:c++latest are not supported.
Flutter Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.27.4, on Microsoft Windows [Version 10.0.20348.3207],
locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[X] Android toolchain - develop for Android devices
X Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/to/windows-android-setup for detailed
instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[X] Chrome - develop for the web (Cannot find Chrome executable at
.\Google\Chrome\Application\chrome.exe)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.12.3)
[!] Android Studio (not installed)
[√] VS Code (version 1.96.2)
[√] Connected device (2 available)
[√] Network resources