leoafarias / fvm

Flutter Version Management: A simple CLI to manage Flutter SDK versions.
https://fvm.app
MIT License
4.73k stars 234 forks source link

[BUG] bump fvm to support Dart 2.18.x #474

Closed subzero911 closed 1 year ago

subzero911 commented 2 years ago

image

fvm v2.4.1

leoafarias commented 2 years ago

@subzero911 does the issue happen when installing FVM through chocolatey also?

subzero911 commented 2 years ago

@subzero911 does the issue happen when installing FVM through chocolatey also?

Yes, I installed it through chocolatey

subzero911 commented 2 years ago

@leoafarias could it be solved, if being installed not through choco, but through pub activate global?

Btw, it's dart 2.18.3 latest now

JaffaKetchup commented 1 year ago

I've run into this issue as well!

subzero911 commented 1 year ago

Meanwhile, the next Dart version, 2.19.1, is out...

leoafarias commented 1 year ago

@subzero911 sorry for the delay on this again. I have to review a bit more in detail on why this issue is happening so often, I think maybe the constraints on FVM are incorrect, as it should not be happening with that much frequency

leoafarias commented 1 year ago

@subzero911 after doing a bit more research I don't think just upgrading the Dart version is a good solution for this, this might only help your case on Chocolatey since you want to have the latest version of Dart, but that is very restrictive for many other use cases including the pub global actiavate.

I am doing a bit of research to understand how the chocolatey version is being built and deployed, as we use a package called cli_pkg for that.

JaffaKetchup commented 1 year ago

Hey @leoafarias, great work so far :) Is there any luck from your research?

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

JaffaKetchup commented 1 year ago

Hey, this ain't stale! Although I do fear FVM has been somewhat abandoned, which is a shame: I hope I'm wrong!

JaffaKetchup commented 1 year ago

@leoafarias With the release of Dart 3, this issue is now vastly more important! I would volunteer to help fix it, but unfortunately, I have no experience with Chocolatey internals.

subzero911 commented 1 year ago

@leoafarias why it's such a bad idea to upgrade it manually? I checked out other packages, and their authors just do it

image

Meanwhile, we can file an issue to the Flutter repository and ask why dependency constraints do not work as expected (^2.16.0 should support 2.18.0 and all versions <3.0.0, but it's not the case).

leoafarias commented 1 year ago

It's not that we can't, but because fvm is a version manager it means that we need loser versions to guarantee compatibility with as many possible environments as possible.

A package like mobx can be more aggressive, also I haven't had time to take a deeper look but I am still no clear on root of the problem since I don't see this happening with our internal use.

JaffaKetchup commented 1 year ago

Just to note, if using the standalone installation instructions, this issue doesn't occur. You can then just set the system PATH manually.

leoafarias commented 1 year ago

@subzero911 there has been an update on cli_pkg which I think it addresses this problem. "hopefully", next version will have that fix

subzero911 commented 1 year ago

Hi! That's great news!

Chappie74 commented 1 year ago

Hey any updates on upgrading the dart version? Currently unable to make use of dart 3.0.

image

leoafarias commented 1 year ago

I suggest using the standalone binaries, brew or chocolatey. For the next version we will release an easier way to install the binaries also.

Chappie74 commented 1 year ago

@leoafarias this was with chocolately. I have both dart and fvm installed using that.

I am however able to work around it by pointing vs code to the dart sdk of the particular flutter version used via fvm.

leoafarias commented 1 year ago

@Chappie74 next week we will be releasing the next version which should hopefully address this issue

leoafarias commented 1 year ago

This is closed. The deploy actions for chocolatey and brew will now pin the compiled version to avoid this going forward.