TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Asdf – language tool version manager

253 pointsby timhiginsover 2 years ago

36 comments

f8over 2 years ago
Used this at my last company. Super painless and makes setup a breeze. Current company uses Docker and I hate it. Every company I&#x27;ve been at loves to throw everything into a container. Even if you setup your dev configs to maintain hot reloading, it&#x27;s always slower. Node package management is also a pain no matter how you implement it with Docker it seems.<p>I also hate the Docker tagline that it &quot;eliminates &#x27;works on my machine&#x27; issues&quot;. I believe a tool like asdf would also achieve this (correct me if I&#x27;m wrong). Docker itself can go haywire depending on the machine and you&#x27;re basically in hell fighting with it just to get your dev environment working. You essentially eliminate one problem in exchange for a variety of equally frustrating challenges.
评论 #33327023 未加载
评论 #33326896 未加载
评论 #33324986 未加载
评论 #33324914 未加载
评论 #33324679 未加载
评论 #33325127 未加载
评论 #33328453 未加载
评论 #33325479 未加载
评论 #33328491 未加载
happensover 2 years ago
I&#x27;ve written a rust version of asdf over the last few months, both as an exercise and to fix a few issues I&#x27;ve been having with it - like noticeably slower tool startup times due to the shims resolving the version (my version basically works like direnv under the hood and hooks into the shell directly) and me just wanting a single &quot;use&quot; command which installs a plugin, downloads the requested version and sets it as active. It works very well and I&#x27;ve been daily driving it for a while.<p>Having the ecosystem of asdf plugins which are basically just shell scripts has been a huge boon. It&#x27;s been a breeze to work with, and most of the plugins are well written.<p>Now, I&#x27;ve been contemplating switching to NixOS, but most version managers don&#x27;t work at all with it due to dynamic linking. I absolutely love the idea of NixOS, but this has really bummed me out. I feel like the nix language is still a little clunky for general use, so as long as there is not a straightforward solution like having a tool-versions file I&#x27;m really hesitant to make the full switch.
评论 #33324394 未加载
评论 #33326197 未加载
评论 #33330476 未加载
评论 #33325056 未加载
评论 #33326433 未加载
评论 #33324659 未加载
ephaetonover 2 years ago
&quot;ASDF (Another System Definition Facility) is an extensible build facility for Common Lisp software. ASDF comes bundled with all recent releases of active Common Lisp implementations as well as with quicklisp, and it is the most widely used system definition facility for Free Software Lisp libraries.&quot;<p>Does asdf come with a plugin for asdf &amp; quicklisp? would&#x27;ve preferred for the new guy on the block pay respect to the old guy on the block and used a different name..
评论 #33328888 未加载
letmeinhereover 2 years ago
One tip that I didn&#x27;t know about and didn&#x27;t seem to be documented at the time I was looking: if you want to add a plugin for some new project but just defer to what you were already using for everything else, you can set your `global` option to `system`. e.g.:<p><pre><code> asdf global python system</code></pre>
评论 #33325335 未加载
denolfeover 2 years ago
I have been using asdf for quite a few years, and I&#x27;ve always been impressed. It&#x27;s honestly a breath of fresh air to only have a single set of commands to remember for node, go, ruby, python, even crystal. For node, it even respects existing .nvmrc files.
评论 #33326201 未加载
teiloover 2 years ago
After the pain of pyenv and it&#x27;s terrible compatibility with poetry, asdf has been a dream come true. It just works, every time. No fragile config. No mess.
评论 #33325038 未加载
rektideover 2 years ago
Rarely have I seen a tool adopted so swiftly and at such scale. It eats the role of hundreds of other language &amp; tool specific version managers, and whatever the secret sauce is, it&#x27;s nicely fast &amp; relatively low pain. Hats off to asdf. Major major delta in devs lives from this recent-ist new more-meta contender.
评论 #33323874 未加载
评论 #33324485 未加载
评论 #33323960 未加载
thunfischover 2 years ago
I&#x27;ve been using this at work, sharing with my colleagues, and integrating this into our default CI&#x2F;CD environment. It&#x27;s awesome and has taken away the thought of &quot;how do I install version XYZ of tool ABC here?&quot; entirely. Just asdf what I need, done. Huge productivity boost.
tpictover 2 years ago
I wonder how many millions of lines of shell configuration have died by people switching to asdf. Fantastic tool
评论 #33324006 未加载
评论 #33325252 未加载
matsemannover 2 years ago
While asdf solves lots of pains, I still feel it solves the wrong problem. What I&#x27;ve instead started to do is to build docker images for various needs. Like, multiple of our projects need terraform, but all different versions. A project should then include that in its dev-dockerfile. No setup, just git clone a project and ready to go. No messing around with &quot;to install and run X you need to have Y already installed, which half of you don&#x27;t so for some reason it wont work in your environment&quot;.
评论 #33324332 未加载
评论 #33324732 未加载
评论 #33324921 未加载
评论 #33348743 未加载
评论 #33325076 未加载
评论 #33324325 未加载
评论 #33324305 未加载
bluehatbritover 2 years ago
I&#x27;m a big fan of asdf, I switched to it from nvm back when I found it and was using node. To be honest I don&#x27;t use it much anymore because I&#x27;ve mostly converged on vscode dev containers. But anything I need to do directly on my local machine or for running the odd random tool it&#x27;s a life saver. Dealing with things like nvm, n, rbenv, and kerl were such a pain before.
pmontraover 2 years ago
I also use it to run different versions of PostgreSQL without having to use docker.
评论 #33324205 未加载
phtrivierover 2 years ago
Probably the only sane way to install Erlang &#x2F; elixir.<p>Sadly, reuses the name of a completely unrelated common lisp tool.
rubyist5evaover 2 years ago
Been using this for years, one of my favourite tools. Ruby, nodejs, python, golang, even direnv - all managed seamlessly. Never had problems with it when things like rvm or nvm would just break one day for no reason, never had it happen with Asdf.
felipelalliover 2 years ago
In a very quick &amp; dirty read I couldn&#x27;t understand what it&#x27;s for. Could someone give me a practical example? I think a practical example is lacking in the introduction.
评论 #33325607 未加载
评论 #33324581 未加载
评论 #33324990 未加载
评论 #33324910 未加载
password4321over 2 years ago
Love this. Can never remember the syntax for installing plugins vs. specific versions without double-checking though.
评论 #33326496 未加载
评论 #33328412 未加载
ivolimmenover 2 years ago
I tried asdf and direnv in the past but they did not cut it when working with Java and Java related tooling. direnv was slow and asdf does not have all the tooling I needed and use. I started using sdkman.io for Java development and it is very complete, up to date and speedy.
评论 #33327500 未加载
Existenceblinksover 2 years ago
Good to see it&#x27;s still kicking, longevity is hard in cli space for non OS built-in ones.<p>Works great in itself, however, PostgreSQL version upgrade is quite hustle. It&#x27;s plug-in area, though could have some protocol with the core to make it seamless. I didn&#x27;t upgrade my postgres for a while (on 12.4 right now).<p>Not sure if it still requires you to do:<p>`POSTGRES_EXTRA_CONFIGURE_OPTIONS=--with-openssl LDFLAGS=&quot;-L&#x2F;usr&#x2F;local&#x2F;opt&#x2F;openssl&#x2F;lib&quot; CPPFLAGS=&quot;-I&#x2F;usr&#x2F;local&#x2F;opt&#x2F;openssl&#x2F;include&quot; asdf install postgres x.x`<p>And run `pg_upgrade` yourself moving data from previous version to the new one&#x27;s directory.
throwawaaarrghover 2 years ago
Downside: it&#x27;s all shell scripts. Upside: it&#x27;s all shell scripts.<p>Seriously through, it&#x27;s pretty easy to create an asdf plugin, and it works great. But it would be great if there were a static executable to handle it all.<p>A couple projects out there come close, but need people to contribute code to finish the most useful functionality. One example is <a href="https:&#x2F;&#x2F;github.com&#x2F;marcosnils&#x2F;bin" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;marcosnils&#x2F;bin</a> - the developer is fully in favor of improvements and added features, but needs someone with the free time to add them.
robertwt7over 2 years ago
I love asdf, switched from nvm, jenv, pyenv to one tool<p>Sadly this is not available in windows so i had to use WSL to run everything. Development in windows is so wonky once you switched from unix based system
Cloudefover 2 years ago
Just use nix and write shell.nix file.
评论 #33325908 未加载
评论 #33325439 未加载
hiyerover 2 years ago
Love asdf. Been using it for python, java and ruby for some time and it does away with the pain of having multiple version managers. Highly recommend.
derridaover 2 years ago
Being a bit of a tool myself I&#x27;d like to define a .toolfile for the whole internet:<p>Convert all data &#x2F; markup to s-expressions<p>Make all code lambda calculus in some paren form<p>No more &quot;xml being manipulated by a scheme designed to look like imperative language&quot; (javacript manipulating the DOM)<p>Thank you have a nice day.
paweldudaover 2 years ago
One version manager to rule them all
tjoffover 2 years ago
I&#x27;ve been qurious about asdf for a while, but looking at the plugins I don&#x27;t find anything about gcc or clang for instance (but quriously cmake).<p>Though asdf itself is language-agnostic, is it in practice used more for web-development or something?
评论 #33329574 未加载
mvaliente2001over 2 years ago
asdf is very nice, with the exception of its interface. You have `asdf &lt;context&gt; &lt;command&gt;`, `asdf &lt;command&gt; &lt;package&gt;` for others. It&#x27;s actively hostile for memorisation.
presentationover 2 years ago
I discovered this tool a couple years ago since I’d type asdf into Google to test my internet and it started topping the results list. Great tool!
anonyme-honteuxover 2 years ago
Is ASDF supposed to work with fish and macOS?<p>My boss loves ASDF and I liked the idea but I tried to use it three times and failed
评论 #33326186 未加载
评论 #33325951 未加载
评论 #33325872 未加载
评论 #33326276 未加载
SighMagiover 2 years ago
It’s also super easy to integrate with non-POSIX shells, if you’re into that kind of thing.
samgranieriover 2 years ago
I&#x27;ve used this for six years on macOS. It&#x27;s been working nicely.
AbraKdabraover 2 years ago
How does this compare to volta.sh?<p>EDIT: Besides being only for JS.
评论 #33324654 未加载
maltalexover 2 years ago
Can anyone suggest a comparable tool for dotnet?
dborehamover 2 years ago
I get on better with sdkman, fwiw.
seandoeover 2 years ago
Great tool. I love it. Thanks!
javier2over 2 years ago
Does it support java?
评论 #33324256 未加载
评论 #33324157 未加载
mattpallissardover 2 years ago
Have a project that requires multiple versions of terraform? what? you don&#x27;t want to...<p>clone the terraform source repo<p><pre><code> ~ git remote -v origin https:&#x2F;&#x2F;github.com&#x2F;hashicorp&#x2F;terraform.git (fetch) origin https:&#x2F;&#x2F;github.com&#x2F;hashicorp&#x2F;terraform.git (push) </code></pre> check out the tag you want<p><pre><code> ~ git tag | tail -1 v1.1.5 ~ git checkout v1.1.5 Previous HEAD position was 516295951 Release v1.1.4 HEAD is now at fe2ddc22a Release v1.1.5 </code></pre> compile&#x2F;install the binary in a local bin dirctory,<p><pre><code> ~ go build go: downloading github.com&#x2F;aws&#x2F;aws-sdk-go v1.42.35 ~ install terraform ~&#x2F;bin&#x2F;terraform-v1.1.5 ~ ls ~&#x2F;bin&#x2F;terraform\* &#x2F;home&#x2F;matt&#x2F;bin&#x2F;terraform &#x2F;home&#x2F;matt&#x2F;bin&#x2F;terraform-v0.13.7 &#x2F;home&#x2F;matt&#x2F;bin&#x2F;terraform-v1.1.4 &#x2F;home&#x2F;matt&#x2F;bin&#x2F;terraform-v0.13.4 &#x2F;home&#x2F;matt&#x2F;bin&#x2F;terraform-v0.14.9 &#x2F;home&#x2F;matt&#x2F;bin&#x2F;terraform-v1.1.5 </code></pre> then manage a series of brittle aliases to disptach the proper version?<p><pre><code> ~ which terraform terraform () { binary=terraform if [[ $1 == &quot;v&quot;\* ]] &amp;&amp; [[ $1 != &quot;validate&quot; ]] then version=$1 shift binary=&quot;$binary-$version&quot; [ -f ~&#x2F;bin&#x2F;$binary ] || bail 1 &quot;missing binary $binary&quot; || return 1 else binary=&#x2F;usr&#x2F;bin&#x2F;$binary fi dispatch --name terraform --scope --slice compilers.slice -c 35 -mh 2048M -mm 2048M -s 1M --binary $binary &quot;$@&quot; } </code></pre> (dispatch just runs things with memory and cpu limits)<p><pre><code> ~ which dispatch dispatch () { if [[ $USER == &quot;root&quot; ]] then command &quot;$binary&quot; &quot;$@&quot; return $? fi declare args=(--user --same-dir -p IOAccounting=yes -p MemoryAccounting=yes -p TasksAccounting=yes) while (($#)) do case &quot;$1&quot; in (-c) args+=&quot;-p&quot; args+=&quot;CPUWeight=$2&quot; shift 2 ;; (-mm) args+=&quot;-p&quot; args+=&quot;MemoryMax=$2&quot; shift 2 ;; (-mh) args+=&quot;-p&quot; args+=&quot;MemoryHigh=$2&quot; shift 2 ;; (-s) args+=&quot;-p&quot; args+=&quot;MemorySwapMax=$2&quot; shift 2 ;; (--scope) args+=--scope shift ;; (--slice) args+=&quot;--slice=$2&quot; shift 2 ;; (--name) name=$1 shift 2 ;; (-P) args+=-P shift ;; (--binary) [ -z &quot;$name&quot; ] || name=$2 binary=&quot;$2&quot; shift ;; (*) break ;; esac done systemd-run $args &quot;$@&quot; 2&gt; &gt;(&gt;&amp;2 grep -vE &#x27;Running.*as unit:&#x27;) } </code></pre> and of course, then you&#x27;d need a shitty little script to call your alias when other tools decide they want to call terraform<p><pre><code> ~ cat ~&#x2F;bin&#x2F;terraform #!&#x2F;usr&#x2F;bin&#x2F;env zsh source ~&#x2F;.zshrc &gt;&#x2F;dev&#x2F;null 2&gt;&#x2F;dev&#x2F;null || exit 1 terraform $@ </code></pre> Because that would be silly and dumb, and I totally don&#x27;t do that for everything.<p>Don&#x27;t even get me started on virtualenvs.
评论 #33348979 未加载
评论 #33325955 未加载