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

include plugin repo(?) in .tool-versions, or perhaps other directory local #1802

Open
xenoterracide opened this issue Nov 28, 2024 · 1 comment

Comments

@xenoterracide
Copy link

xenoterracide commented Nov 28, 2024

Is your feature request related to a problem? Please describe

I'd like to be able to include a .tool-versions in my github repo, but I realize that if I were to expect other developers to use it they'd have to know where I got the tool versions from, and ... well there's a whole lot of duplicate documentation that has to be written and maintained, especially for those that aren't familiar with asdf.

Describe the proposed solution

given this .tool-versions

java temurin-21.0.5+11.0.LTS
nodejs 22.11.0
ktlint 1.4.1
python 3.13.0t

and this asdf plugin list --urls --refs

direnv                       https://github.com/asdf-community/asdf-direnv.git master 6ff3dbe
java                         https://github.com/halcyon/asdf-java master 5f62564
ktlint                       https://github.com/esensar/asdf-ktlint.git main 809a955
maven                        https://github.com/halcyon/asdf-maven.git master 583612b
nodejs                       https://github.com/asdf-vm/asdf-nodejs.git master 93bd217
python                       https://github.com/danhper/asdf-python.git master a3a0185
rust                         https://github.com/code-lever/asdf-rust.git master 95acf4f

then .toolbox-versions

java temurin-21.0.5+11.0.LTS https://github.com/halcyon/asdf-java master
nodejs 22.11.0 https://github.com/asdf-vm/asdf-nodejs.git master
ktlint 1.4.1 https://github.com/esensar/asdf-ktlint.git main
python 3.13.0t https://github.com/danhper/asdf-python.git master

I think this specification is imperfect but hopefully it highlights the idea.

I am not retaining the specific sha because I personally wouldn't expect the local to do sha swapping unless the source had a different sha, it could though, you can have more than one git checkout for a single repo. I'm also not certain how the first column of .toolbox-versions works. I'm actually kind of guessing that is the plugin name, which actually makes me think the current design might be conflicting. I would think it might be better for there to be no name for this use case, as we are installing this for everyone and locally named plugins are not necessarily the same as global. Although it could be reasonable that when within this tool-version scope any reference to java would use the local version defined here, instead of the global one.

Describe similar asdf features and why they are not sufficient

currently tool-versions describes the version of the tool, just not where it got it from.

Describe other workarounds you've considered

having a general documentation repo for all of my code, copy pasta shell scripts that do similar things lazily.

@thomaschow
Copy link

there is currently a plugin that will do the plugin version management of this: https://github.com/asdf-community/asdf-plugin-manager but would be nice to see that included in the main asdf CLI.

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