-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Support for asdf v0.16.0? #194
Comments
There are a few issues that probably need to be done for asdf 0.16.0 support: To make it work minimally, you need to do:
To make the "asdf cmd direnv" commands work, you need to:
This should make the version work for the time being, but a mid-term issue is this pull request: asdf-vm/asdf#1822 |
Nice. Those changes look like they work. |
to make `asdf` version `0.16.1` work with `direnv`
@reneploetz Very helpful; thank you! FWIW, my commands scripts are located in |
I made the suggested changes, but I'm getting the following error:
|
As stated: This plugin currently requires files from the bash version of asdf. This means that you need to have get the source from either git or source download and point the environment variable "ASDF_DATA_DIR" to it (alternative/default: $HOME/.asdf). It's not sufficient to just download the asdf binary and I assume that the homebrew version only installs the binary and shell completions. |
OK, I created a fork and issued a pull request that makes the bash command changes and changes the setup to use the proper new cmd syntax and it also caches the asdf library in a new directory Hard to test on different configurations but seems to work on MacOS Sequoia 15.3 and thanks to @esran for figuring out the issues, that is one tangle of bash scripts! Also note to maintainers, I also updated the README.md because all references to The other problem is that the syntax change breaks old tests as they use the older syntax. The fix there is to tag this fix as 0.16 specific but again I didn't want to break how you version. Since 0.16 is really a breaking change, they should have done 1.01 to signal it (but of course you can't really do that for software like this). And this plugin should also jump versions but again I didn't feel like this was my "job" to make the testing and version decisions. I also made some other changes, the old asdf bash disabled set -e and -o pipe fail, but if you have these loaded then various scripts will fail. There is a one line change to lib-asdf (I tried to avoid it but couldn't think of a way to do it where it does a -n check for a variable that may not exist. I changed it to -v). Also if you are using venv, the old Finally local no longer exists, so I turned it into Quick code not the proudest moment of bash hacking #195 |
@richtong, where is this PR? |
Last note if someone wants to get running is to just use this branch the easy thing to do is:
And you will have this branch until the next time you update. Hopefully someone will fix this at some point, but at least this works for me now. |
OK, I think I have all the fixes, including getting the use_asdf.sh working again, it is in an outstanding pull request #195 If you really want this to work again, you can also
And it should work. The only thing that's a pain is that |
And there is a case where I changed the old asdf local to asdf set as well |
I only just started using asdf and direnv and already there have been updates. asdf v0.16.0 is a major rewrite in Golang. It looks like it breaks direnv.
In a directory with
use asdf
in the.envrc
:It might be that the new golang version of asdf is fast enough even with shims. However, I kind of need the environment setup of direnv so I can remove shims from the PATH. This is because asdf keeps a shim for old python versions (e.g.
python3.6
) even when not being used. And cmake python detection gets tripped up by this as its in the PATH and executable but not actually valid.For now I'm happy enough to keep using asdf v0.15.0 but it would be nice to be on the latest version of things.
The text was updated successfully, but these errors were encountered: