puro icon indicating copy to clipboard operation
puro copied to clipboard

Create pure dart environments

Open passsy opened this issue 2 years ago • 2 comments

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?

passsy avatar Jul 24 '23 12:07 passsy

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
    ```

pingbird avatar Jul 30 '23 05:07 pingbird

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.

FMorschel avatar May 30 '24 00:05 FMorschel