asdf icon indicating copy to clipboard operation
asdf copied to clipboard

No way to provide priority of executables when multiple plugins have the same executable

Open fmmoret opened this issue 4 years ago • 4 comments

Is your feature request related to a problem? Please describe

We have graalvm 20.1.0-java11 and nodejs 16.9.1 in our tool versions. Both have "node" in their bins.

We are currently adding only the node plugin, asdf installing, and then adding the rest to get around the issue.

If we don't install them in the correct order, our node version will resolve to the 12.x.x version in the graalvm plugin.

Describe the proposed solution

Can we provide priority in a config file or exclude some executables from plugins?

Describe similar asdf features and why they are not sufficient

We tried different .tool-versions orderings; didn't seem to fix it. We can try uninstalling and reinstalling in various permutations like we did, but this process is very error prone & tough for new developers. Looked in the existing asdf config documentation and didn't see anything related to this.

Describe other workarounds you've considered

Manually editing shim files to put the plugin/metadata comments back in the correct order. This one works, but is also not sustainable

fmmoret avatar Dec 14 '21 20:12 fmmoret

Not sure how to fix it, maybe add a feature to enable and disable tools that aren’t used via .tool-versions. But that would be a new feature request.

Meanwhile, one way around it might be to use direnv and have different paths set in custom environments for each node and graalvm project(s). If you're using tools to produce scaffolding/skeleton files for projects this can be added. I actually think this is a good solution anyway.

andrewcrook avatar Dec 16 '21 16:12 andrewcrook