5 ms·
I've been using it and has contributed to it, but I wish it supported out of the box GitHub-based release binaries as 90% of my code for different vendors was r
by nikolay 6y ago
I've been using it and has contributed to it, but I wish it supported out of the box GitHub-based release binaries as 90% of my code for different vendors was relatively the same, so, instead of having multiple identical repositories, I created one, which uses introspection [0].
I wish this was available out of the box to handle literary 90% of the tools.
Also, I typically pair it with direnv [1] for even more magic.
[0]: https://github.com/Banno/asdf-hashicorp https://github.com/Banno/asdf-hashicorp
[1]: https://direnv.net/ https://direnv.net/
- burlesona 6y agoThanks for sharing direnv, I didn’t know about that but I’ve wished for it before. Great find :)
- nikolay 6y agoIt's a gem, really.
- fiddlerwoaroof 6y agoI use nix/direnv/lorri to manage all my projects. It’s easily the best def experience, once you get over the learning curve for nix.
- ahawkins 6y agoThank you for asdf-hashicorp. We use it at Skillshare.
- nikolay 6y agoThank you! It's nothing special.
- mwudka1 6y agoThank you for asdf-hashicorp. We use it at HashiCorp.
- nikolay 6y agoYou're welcome!
- dnautics 6y agoDirenv/asdf is crazy fantastic. I was afraid asdf and direnv would fall into the venv/conda hell that is python, but it. Just. Isn't.
- s0l1dsnak3123 6y agoI've also written a handful of plugins for asdf, and this is exactly my experience also - I even used the asdf-hashicorp library as the basis for https://github.com/vmware-tanzu/asdf-carvel https://github.com/vmware-tanzu/asdf-carvel Seems like a lot of duplicated work across all these plugins
- johnwyles 6y agoCan this replace the broken and horrible tools of rbenv, pyenv, and pipenv? I shudder whenever a new version comes out what it does to my shell when I have a broken version (included as the latest from the output from pyenv globals or some such)
- frizkie 6y agoI'm not understanding what you mean about *env. I use rbenv and I'm a maintainer of crenv for Crystal, I never have any issues with how they are implemented. Can you be more specific? Maybe something's broken.
- BerislavLopac 6y agopyenv and pipenv are two very different things. pipenv is desperately broken, and should be avoided; Poetry is one good alternative. pyenv, on the other hand, is great.
- philsnow 6y agoSeeing all the love for direnv makes me feel like I'm the only one taking crazy pills. Direnv breaks referential transparency of the shell. I heavily use my shell history to riff on commandlines I've entered in the past. If direnv is in the mix, my shell pipelines sometimes have to have `cd` in them, often in subshells because that works better for me than pushd/popd. pyenv/rbenv/asdf do the same thing, but you can have a "global" version pinned and do all your shell-related package installs there, so it doesn't end up being that bad. Though, this still breaks when I happen to be sitting in a directory on my system that has a .python-version file. All of a sudden my "global"ly installed python packages don't work. I greatly prefer tools like pipx / pipsi for this purpose (is there a language-agnostic pipx-alike? or is that nix?) because the shims they install usually work no matter what my shell environment/CWD is. .... Maybe most of my ire is because my only exposure to direnv is because at least one repo at my day job uses it. For me it's not so much "customize your environment any way you want", it's "oh did you run that command from projectdir/foo instead of projectdir/foo/bar? That doesn't work". Debugging the interactions between people's individual poetry/pipenv/pip/rbenv/direnv/etcetcetc setups and project-based setups is the bane of my work life.
- nikolay 6y agoAlthough I agree in general, direnv is pretty transparent. For example, you need to approve any change in .envrc and it's pretty verbose. It also solves another big issue for me - I no longer have to install globals like with "npm i -g"and I can use "pip install --user" without trading off convenience and using weird relative bin paths!
- meatcar 6y agoYou can just not hook direnv into your shell, and use `direnv exec` kind of like pipx. Tools like asdf, direnv, nix-shell, etc. just encapsulate the environment and help set up some guarantees. The referential transparency of shells is something that these tools help enforce, if anything. I agree that frequent jumping between the fragmented environments is pain point in software development these days. That's due to a lack of tooling to support the new workflow, in my opinion. I hope enough people feel this pain that we see some solutions. Having an expressive shell like https://starship.rs https://starship.rs helps keep you oriented as a sort of HUD. Nix is definitely a life-saver, but you can probably roll your own nix-a-likes. Encapsulate all the "global" precious tools, hardening them against changes in the "local" shell environment. Whether through wrapper scripts, containerization, or what have you, the building blocks are there, the "best practices" are still being created.
- nine_k 6y agoMagic. This is not what I'd like to see around my code and my systems. I'd prefer everything about them to be transparent and explainable. (My favorite worth-1000-words picture about that is e.g. here: http://www.tshirtvortex.net/free-magic/ http://www.tshirtvortex.net/free-magic/)
- darkblackcorner 6y agoThat's a brilliant T XD