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
From offline discussions: A large majority of the time when a user runs volta install while in a package, what they actually meant to do was volta pin. Additionally, it's confusing to run volta install node@10, see a success message saying that node@10.13.0 was installed and made the default, and then run node -v and not see any change because you are in a project that was pinned (see volta-cli/volta#609).
We discussed consolidating volta pin into volta install, so that the volta install command is also context-aware, and will do the expected thing depending on whether you are in a project or not. We could also consider having a --default or other flag, that allows a user to explicitly change the default, even if they are inside a node project.
In general I like the basic proposal, although I do think there is some utility in the distinct operations of pinning a version and fetching a version—even if you often do both together. ("Install" has for this reason always seemed a somewhat murky term to me, and I actually quite likepin for that reason.)
One possibility that occurred to me on rereading this tonight: we could make it so that you always needed --default to set the default one. The downside: this may be slightly annoying. The upside: it's more consistent and it's never implicit/accidental.
At least in the discussions we had, there wasn't any talk of removing the fetch command. Mostly we noted that install and pin are effectively the same, they fetch and then write the configuration somewhere. The only difference is where the version is written, so we can just make that an option and provide a more convenient default behavior.
I'm on the fence about always requiring the --default parameter: As you say, it's more consistent and less likely to happen accidentally. On the other hand, if we provide a CTA for when you run volta install out of a package that suggests running volta install --default, it starts to raise the question of why don't we just do that behavior? I think either proposal is fine in the RFC, we'll just want to keep an eye on it and see if there are usability wins one way or the other once the feature is available.
Activity
chriskrycho commentedon Dec 6, 2019
In general I like the basic proposal, although I do think there is some utility in the distinct operations of pinning a version and fetching a version—even if you often do both together. ("Install" has for this reason always seemed a somewhat murky term to me, and I actually quite like
pinfor that reason.)One possibility that occurred to me on rereading this tonight: we could make it so that you always needed
--defaultto set the default one. The downside: this may be slightly annoying. The upside: it's more consistent and it's never implicit/accidental.charlespierce commentedon Dec 6, 2019
At least in the discussions we had, there wasn't any talk of removing the
fetchcommand. Mostly we noted thatinstallandpinare effectively the same, they fetch and then write the configuration somewhere. The only difference is where the version is written, so we can just make that an option and provide a more convenient default behavior.I'm on the fence about always requiring the
--defaultparameter: As you say, it's more consistent and less likely to happen accidentally. On the other hand, if we provide a CTA for when you runvolta installout of a package that suggests runningvolta install --default, it starts to raise the question of why don't we just do that behavior? I think either proposal is fine in the RFC, we'll just want to keep an eye on it and see if there are usability wins one way or the other once the feature is available.