-
Notifications
You must be signed in to change notification settings - Fork 783
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
install order should follow the order in .tool-versions #929
Comments
@jthegedus not sure if this should be another issue, but in the regards of awscli plugin, it uses a global version of python instead of a local version, is there a way to use a locally defined tool inside a plugin? |
Good question. It depends on the plugin implementation. Ideally, each tool installed is a standalone, pre-packaged binary. If it's not, the plugin may build the tool from source (tools with git-ref installation support likely do this). As I understand, AWS CLI v2+ ships it's own version of python in pre-built packages. So either the plugin needs to handle installation of v2+ different to v1 and no longer rely on the system python to build (which in this case is probably in the global As for
What version is the "local" version and who is defining it? Is this defined by the plugin, by the tool being installed or by you the installer of the tool? What is it local to? |
To clarify, the reason I marked this as a bug is because elsewhere in The solve for this is to ensure
|
@jthegedus Makes sense. At the time of writing I was thinking local to the folder you execute in. E.g. I'm in project-a and I've defined a python version in .tool-versions so I'd expect that one to be used if no python executable is found. Resolution could be recursive. Shell -> Local -> Global -> System |
The resolution order is (from memory) Shell > @lifeiscontent this GitHub Discussion topic is relevant - https://github.com/asdf-vm/asdf/discussions/845 |
@jthegedus thats awesome, so if that is the case, that is not what is happening when installing awscli ~ Major version 1 which I believe is due to running some commands in a sub directory. |
specifically due to this line: https://github.com/MetricMike/asdf-awscli/blob/2c4638b214e2081a0f3f71aa17542981f7b6b66e/lib/utils.bash#L102 |
@lifeiscontent you should look at this interesting plugin someone has made - https://github.com/asdf-vm/asdf/discussions/980 |
Any idea why this is a 404? An area where I got snagged just now: asdf-poetry installing before asdf-python |
This may have no point to it if they run randomly / the behavior isn't defined. See also: asdf-vm/asdf#929
It's a 404 because we turned off GitHub Discussions
That is unfortunate. Sorry about this. I have marked this as a priority to be fixed, though, as always, PRs are welcome! |
I also build a plugin for another package manager PDM https://github.com/1oglop1/asdf-pdm and the installation is the same as poetry -> pipe I'm happy to contribute PR if you can give me some pointers on where to start reading the code to save me some time. |
Related #1127 |
### Description of change Due to asdf-vm/asdf#929, `go-jsonnet` fails as it is installed before `golang`. **Bug fix:** - Fixed an ordering issue with `go-jsonnet` installation - Updated `gcloud` version from `429.0.0` to `436.0.0` - Modified the order of dependencies in `.tool-versions` - Changed the `install_plugins` function in `scripts/install_asdf_tools.sh` to install plugins in the specified order > 🎉 A bug we did chase, now fixed in place, > Dependencies aligned, their order refined, > With gcloud updated, and plugins awaited, > Our code stands strong, as we march along! 🚀
Modified the install_local_tool_versions function to prioritize the order of tools as specified in the .tool-versions file. Previously, the order of installed plugins was used. Closes asdf-vm#929.
Just to add another data point: the |
Made a PR here to address this. #1723 If interested, let me know. |
Describe the bug
Some plugins depend on others to be installed first. Despite being expressed that way in the .tool-versions file, asdf alphabetizes the install regardless.
This feels like it should be the default behavior, but at the very least there should be a flag for it.
To Reproduce
# .tool-versions python 3.9.4 awscli 2.2.0
asdf install
Expected behavior
The .tool-versions file is installed top to bottom.
Actual behavior
The installation happens in alphabetical order.
Environment
OS: Darwin C02WQ018HTDD 20.4.0 Darwin Kernel Version 20.4.0: Fri Mar 5 01:14:14 PST 2021; root:xnu-7195.101.1~3/RELEASE_X86_64 x86_64 SHELL: zsh 5.8 (x86_64-apple-darwin20.0) ASDF VERSION: v0.8.0
The text was updated successfully, but these errors were encountered: