-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add skipping version mismatch handling when using force or running with a custom fvm version. #654
Conversation
@Bassiuz is attempting to deploy a commit to the FlutterTools Team on Vercel. A member of the Team first needs to authorize it. |
@Bassiuz I requested a change, also make sure you run |
@leoafarias Thank you for the review; the warnings make a lot of sense so I added them. Also fixed a warning shown bij DCM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Would it not be useful to have a way to ignore the version mismatch prompt in all My current CI is dependent on using a custom flutter version to build, and while this PR fixed the install part of the equation my build script still gets stuck on the question to resolve the version mismatch on the Is there already a command I'm missing to skip this step, or would it require another patch @Bassiuz @leoafarias ? |
Nevermind, I just remembered I could just call |
It should never check for a version mismatch if you prepend your custom flutter name with |
Sorry I realize now my case actually isn't related to "custom flutter versions" at all, I was actually not aware of the feature of prepending In my case it was actually a project where we have a portion of an app using Flutter, but a very old version. The parts of the app in Flutter aren't really worked on actively (so we haven't bothered to upgrade) but are still built to a native framework by CI and later included into a (otherwise native) app. It was this build that suddenly stopped working with newer versions of fvm installed via brew (it was being halted by the cached version prompt). Your PR helped circumvent this issue, but I see now it wasn't necessarily to do with "custom fvm" versions, but rather the mismatch warning seems to be always shown for any non-numeric version number (regardless if custom or not). E.g...
Flutter stopped prepending their version names with |
@AndreasMattsson can you open a new issue with the item above? |
@leoafarias Sure thing: here. |
@Bassiuz Do you know about this issue: when using prefix custom_ then Please check below log name@PC MINGW64 /d/Projects/flutter (master)
$ fvm install 3.19.3
✓ Flutter SDK: SDK Version : 3.19.3 installed! (6.7s)
name@PC MINGW64 /d/Projects/flutter (master)
$ fvm use 3.19.3
Setting up Flutter SDK: 3.19.3
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine ...
Expanding downloaded archive with PowerShell...
Building flutter tool...
Running pub upgrade...
Resolving dependencies... (3.4s)
Got dependencies.
Flutter 3.19.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ba39319843 (11 days ago) • 2024-03-07 15:22:21 -0600
Engine • revision 2e4ba9c6fb
Tools • Dart 3.3.1 • DevTools 2.31.1
✓ Flutter SDK: SDK Version : 3.19.3 is setup
[WARN] You are using VSCode, but fvm is not managing VSCode settings for this project.Please remove "updateVscodeSettings: false" from .fvmrc
✓ Project now uses Flutter SDK : SDK Version : 3.19.3
┌────────────────────────────────────────────────────────────────────┐
│ ✓ Running on VsCode, please restart the terminal to apply changes. │
└────────────────────────────────────────────────────────────────────┘
You can then use "flutter" command within the VsCode terminal.
name@PC MINGW64 /d/Projects/flutter (master)
$ fvm flutter --version
Flutter 3.19.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ba39319843 (11 days ago) • 2024-03-07 15:22:21 -0600
Engine • revision 2e4ba9c6fb
Tools • Dart 3.3.1 • DevTools 2.31.1
name@PC MINGW64 /d/Projects/flutter (master)
$ fvm dart --version
Dart SDK version: 3.3.1 (stable) (Wed Mar 6 13:09:19 2024 +0000) on "windows_x64"
name@PC MINGW64 /d/Projects/flutter (master)
$ fvm use custom_3.19
[WARN] Not checking for version mismatch as custom version is being used.
[WARN] You are using VSCode, but fvm is not managing VSCode settings for this project.Please remove "updateVscodeSettings: false" from .fvmrc
✓ Project now uses Flutter SDK : SDK Version : custom_3.19
┌────────────────────────────────────────────────────────────────────┐
│ ✓ Running on VsCode, please restart the terminal to apply changes. │
└────────────────────────────────────────────────────────────────────┘
You can then use "flutter" command within the VsCode terminal.
name@PC MINGW64 /d/Projects/flutter (master)
$ fvm flutter --version
[WARN] Not checking for version mismatch as custom version is being used.
[WARN] Version custom_3.19 is not a valid semver
Flutter 3.19.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ba39319843 (11 days ago) • 2024-03-07 15:22:21 -0600
Engine • revision 2e4ba9c6fb
Tools • Dart 3.3.1 • DevTools 2.31.1
name@PC MINGW64 /d/Projects/flutter (master)
$ fvm dart --version
[WARN] Not checking for version mismatch as custom version is being used.
[WARN] Version custom_3.19 is not a valid semver
[WARN] Version custom_3.19 is not a valid semver
'C:\Development\fvm\versions\custom_3.19\bin\cache\dart-sdk\bin\dart.bat' is not recognized as an internal or external command,
operable program or batch file.
|
@quyenvsp I cannot reproduce this on my custom flutter version. What happens when you run |
When running fvm use with a custom Flutter version or running with the force command, FVM still tries to correctly handle version mismatching. However, it is expected that the installed version should be used as this is the custom installed folder or is forced by adding the force command.
This should fix issue #653