Skip to content
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

Flutter 3.19.1 uses dart 3.2.5 instead of 3.3.0 #655

Closed
3 tasks done
emreakcan opened this issue Feb 26, 2024 · 3 comments
Closed
3 tasks done

Flutter 3.19.1 uses dart 3.2.5 instead of 3.3.0 #655

emreakcan opened this issue Feb 26, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@emreakcan
Copy link

emreakcan commented Feb 26, 2024

Before creating a bug report please make check the following

  • You have read our FAQ
  • If you have used flutter. Please install correctly, run pub cache repair. Close the terminal and try again.
  • [] If you are on Windows. Make sure you are running the terminal as administrator or with developer permissions.
  • Run fvm doctor if possible and add the output to the issue.

Describe the bug
Using flutter 3.19.1, but fvm uses dart 3.2.5, should be using 3.3.0

To Reproduce
Install newest fvm 3.0.11, run fvm use 3.19.1, observe fvm dart --version

Expected behavior
Should be using dart 3.3.0

Logs

emre@Emres-MacBook-Pro-2  % fvm --version
3.0.11

emre@Emres-MacBook-Pro-2 % fvm flutter --version
Flutter 3.19.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 67457e669f (6 weeks ago) • 2024-01-16 16:22:29 -0800
Engine • revision 6e2ea58a5c
Tools • Dart 3.3.0 • DevTools 2.28.5

emre@Emres-MacBook-Pro-2  % fvm dart --version
Dart SDK version: 3.2.5 (stable) (Tue Jan 16 15:02:13 2024 +0000) on "macos_arm64"

emre@Emres-MacBook-Pro-2  % fvm flutter pub get
Resolving dependencies... 
The current Dart SDK version is 3.2.5.

Because project requires SDK version >=3.3.0 <4.0.0, version solving failed.
You can try the following suggestion to make the pubspec resolve:
* Try using the Flutter SDK version: 3.19.1. 

Desktop (please complete the following information):

  • OS: [Mac OS silicon]
  • FVM Version [3.0.11]

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.1, on macOS 14.1.2 23B92 darwin-arm64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[!] Android Studio (version unknown)
    ✗ Unable to determine Android Studio version.
[✓] Android Studio (version 2023.1)
[✓] Connected device (3 available)
[✓] Network resources

! Doctor found issues in 1 category.
Screenshot 2024-02-26 at 12 26 12 Screenshot 2024-02-26 at 12 26 58
@emreakcan emreakcan added the bug Something isn't working label Feb 26, 2024
@leoafarias
Copy link
Owner

@emreakcan can you provide the output for fvm doctor?

@leoafarias
Copy link
Owner

@emreakcan I believe the issue is the following:

If you run

fvm --verbose flutter --version

You probably see that fvm is running the Flutter SDK from PATH, because there is no version configured in the project folder.

Which means if you run

fvm --verbose dart --version

It means that it will run the Dart version that is configured in the PATH, which is not the one in Flutter.

If that is the case, then this is not a "bug" as it is behaving correctly, however I think we might do an enhancement for this, where it might be more logical to use the dart version of the flutter SDK path.

@leoafarias
Copy link
Owner

Will close this, and have added as part of an iprovement on issue #648

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants