You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A major feature we use in FVM that is currently missing from Puro is the ability to commit a file to a repo that pins the projects environment to a specific version. This use case was mentioned in #35, but the current implementation doesn't fully address it. When testing Puro I observed that if an environment was specified in .puro.json that did not exist, then Puro would change the contents of .puro.json to match the current global default:
$ puro ls
[i] Environments:
~ stable (stable / 3.16.0 / db7ef5bf9f)
beta (not installed)
master (not installed)
Use `puro create <name>` to create an environment, or `puro use <name>` to switch
$ cat .puro.json
{
"env": "3.13.9"
}
$ puro use
[✓] Switched to environment `stable`
$ cat .puro.json
{
"env": "stable"
}
This doesn't really help with the use case of pinning a version for a project, where:
New contributors need an easy way to set up their environment w/ the correct version
Existing contributors should have their environment easily switch versions as they navigate the repo history
CI/CD builds always start with an empty environment and need to initialize with the pinned version
FVM handles this by automatically installing the version specified in its config file if it is missing as part of fvm use. I think it would be great if Puro offered the same functionality. Failing that, it should at least error out with a message to install the missing environment rather than quietly changing it to whatever the global default happens to be.
The text was updated successfully, but these errors were encountered:
That is definitely something I overlooked when implementing the logic for puro use, thanks!
It should automatically install the desired flutter version when running the puro flutter command, but ideally it also keeps your IDE config in sync with what's specified in .puro.json
@pingbird what would be really cool is if it could just detect from pubspec.yaml if pubspec.yaml has a flutter: 3.19.6 or whatever instead of a range.
i have always found it sad that the max range is not respected anyway.
A major feature we use in FVM that is currently missing from Puro is the ability to commit a file to a repo that pins the projects environment to a specific version. This use case was mentioned in #35, but the current implementation doesn't fully address it. When testing Puro I observed that if an environment was specified in
.puro.json
that did not exist, then Puro would change the contents of.puro.json
to match the current global default:This doesn't really help with the use case of pinning a version for a project, where:
FVM handles this by automatically installing the version specified in its config file if it is missing as part of
fvm use
. I think it would be great if Puro offered the same functionality. Failing that, it should at least error out with a message to install the missing environment rather than quietly changing it to whatever the global default happens to be.The text was updated successfully, but these errors were encountered: