pingbird / puro

A powerful tool for installing and upgrading Flutter versions.
https://puro.dev
Other
215 stars 10 forks source link

Create pure dart environments #22

Open passsy opened 11 months ago

passsy commented 11 months ago

I'd love to use puro to also manage my dart versions. It would be very helpful as package author of multiple pure dart packages, to be able to switch between dart versions, without knowing which dart version matches which Flutter version.

puro create --dart my_env
puro upgrade my_env 2.19 # switch to dart 2.19 
puro upgrade my_env 3.0 # switch to dart 3.0

Would you see this in scope of this puro?

pingbird commented 11 months ago

Unfortunately the way dart is distributed is significantly different from Flutter so supporting this feature will take awhile, setting a dart-only environment as the global default will also prevent the flutter commands from working.

Until then, if you want to install a specific version of Dart with Puro use puro releases and find the version of Flutter that corresponds to it:

ping@bean:~$ puro releases
[i] Latest stable releases:
    Flutter 3.10.6         | 2w  | f468f3366c | Dart 3.0.6 
    Flutter 3.10.5         | 1mo | 796c8ef792 | Dart 3.0.5 
    Flutter 3.10.4         | 2mo | 682aa387cf | Dart 3.0.3 
    Flutter 3.10.3         | 2mo | f92f44110e | Dart 3.0.3 
    Flutter 3.10.2         | 2mo | 9cd3d0d9ff | Dart 3.0.2 
    Flutter 3.7.12         | 3mo | 4d9e56e694 | Dart 2.19.6
    Flutter 3.3.10         | 6mo | 135454af32 | Dart 2.18.6
    Flutter 3.0.5          | 1y  | f1875d570e | Dart 2.17.6
    Flutter 2.10.5         | 1y  | 5464c5bac7 | Dart 2.16.2
    Flutter 2.8.1          | 2y  | 77d935af4d | Dart 2.15.1

    Latest beta releases:
    Flutter 3.13.0-0.2.pre | 1w  | ac71592bc6 | Dart 3.1.0 
    Flutter 3.13.0-0.1.pre | 3w  | 1f6bdb6fa2 | Dart 3.1.0 
    Flutter 3.12.0         | 2mo | 8fcb74dbc1 | Dart 3.1.0 
    Flutter 3.12.0-1.1.pre | 1mo | e2e0aa7037 | Dart 3.1.0 
    Flutter 3.11.0-0.1.pre | 2mo | 350d2c3a6c | Dart 3.1.0 
    Flutter 3.10.0-1.5.pre | 3mo | b1c77b7ed3 | Dart 3.0.0 
    Flutter 3.9.0-0.2.pre  | 4mo | 0df8557c56 | Dart 3.0.0 
    Flutter 3.8.0-10.1.pre | 5mo | 1a0a03a41d | Dart 3.0.0 
    Flutter 3.7.0-1.5.pre  | 6mo | 099b3f4bf1 | Dart 2.19.0
    Flutter 3.6.0-0.1.pre  | 8mo | 75927305ff | Dart 2.19.0
FMorschel commented 1 month ago

Something happened today that showed me how useful it would be.

Dart-code (vsCode extension for Dart) started warning that I'm not with the latest Dart release, 3.4.2 (Flutter bundled version is 3.4.1) and I was working on a Dart-only project so this would have been a great addition to have if I could set puro use to the latest Dart stable release in that project.