Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to the latest release of a version #1342

Closed
t18n opened this issue Oct 6, 2022 · 4 comments
Closed

Switch to the latest release of a version #1342

t18n opened this issue Oct 6, 2022 · 4 comments

Comments

@t18n
Copy link

t18n commented Oct 6, 2022

Is your feature request related to a problem? Please describe

Is there a way to automatically switch to another runtime version using only the major version. Using NodeJs plugin, for example, running asdf local nodejs 16 doesn't work but asdf local nodejs 16.17.0.

Describe the proposed solution

Implement asdf local nodejs 16.x.x or asdf local nodejs 16.x as a command, then allow 16.x or 16.3.x in .tool-versions

Describe similar asdf features and why they are not sufficient

The command asdf local nodejs 16.17.0 will create .tool-versions file in the project repo with nodejs 16.17.0 in it, which does not take effect if the other team member clones the repo and have 16.17.1 installed locally.

Describe other workarounds you've considered

Force other team member to install the same version

@jthegedus
Copy link
Contributor

You can get the very latest with asdf local nodejs latest.

Unfortunately, there seems to be a bug where the filter expression asdf local nodejs latest 16 does not resolve as expected. 16 does not get passed to the latest function to filter properly.

@jthegedus
Copy link
Contributor

The feature request for:

Implement asdf local nodejs 16.x.x or asdf local nodejs 16.x as a command, then allow 16.x or 16.3.x in .tool-versions

has already been discussed and declined numerous times.

If asdf local nodejs latest is not sufficient, then this issue can be closed as a duplicate.

@t18n
Copy link
Author

t18n commented Jan 1, 2023

The issue is more about better suppport for auto-switching between versions using .tool-versions file. With nvm, for example, I can create an nvmrc and put in 16 and it will automatically select 16.x on computers of my team members, asdf doesn't seem to support that.

@jthegedus
Copy link
Contributor

The issue is more about better suppport for auto-switching between versions using .tool-versions file. With nvm, for example, I can create an nvmrc and put in 16 and it will automatically select 16.x on computers of my team members, asdf doesn't seem to support that.

Yes, that scenario is specifically not supported. asdf is designed to ensure everyone on a team is using the exact same version. If I am using nodejs@16.0.0 and you are using nodejs@16.19.0 those two versions are not anywhere close to being the same. They have different V8 engines, many different features and numerous bug fixes etc. How can we determine the root cause with this variability? Solution, remove the variability. Yes, this makes asdf slightly less convenient to use, but the purpose of locking a team to a version is to lock them to a version. Version ranges introduce variability.

Given we have discussed this particular feature request numerous times before, I will close this Issue as we are explicitly not going to support this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants