[HN Gopher] Asdf - An Extendable Version Manager
       ___________________________________________________________________
        
       Asdf - An Extendable Version Manager
        
       Author : BerislavLopac
       Score  : 87 points
       Date   : 2021-02-03 20:27 UTC (2 hours ago)
        
 (HTM) web link (asdf-vm.com)
 (TXT) w3m dump (asdf-vm.com)
        
       | burlesona wrote:
       | Smart that it's based on rbenv and the many spin-offs (pyenv,
       | nodenv etc).
       | 
       | The name is off putting to me though, because it's meaningless.
       | Maybe I could alias it to something like xenv and pretend it
       | didn't bother me.
        
         | 1123581321 wrote:
         | No way! asdf is full of vast meaning. :)
         | http://asdf.com/whatisasdf.html
        
       | rmsaksida wrote:
       | I've been using it for Ruby and Node.js for years and never had
       | issues with it. Great tool.
        
       | pmontra wrote:
       | I've been using it since 2017 for an Elixir/Phoenix backend,
       | React frontend and PostgreSQL database. It works very well and
       | spares me from having to use three language managers (one for
       | Elixir, one for Erlang and one for JS) plus a docker container
       | for PostgreSQL. I was pleasantly surprised that it manages the
       | database too.
        
         | dceddia wrote:
         | Mind elaborating on how it manages the database? That sounds
         | useful! Does it install and run the db for you or something?
        
           | pmontra wrote:
           | It installs the binaries and the data into a subdirectory of
           | ~/.asdf, then sets PATH and the other environment variables
           | to point to there. Then pg_ctl start starts the database.
           | 
           | Each project has its own .tool_versions file so you can have
           | different versions of the same database running in parallel.
           | I was doing that with docker containers but this is easier.
        
           | styluss wrote:
           | It manages the version of the database that you run.
           | https://github.com/smashedtoatoms/asdf-postgres
        
           | sgerrand wrote:
           | I'm assuming the author was referring to this plugin:
           | https://github.com/smashedtoatoms/asdf-postgres
        
         | pavel_lishin wrote:
         | My install of asdf at some point broke so badly, I could not
         | get anything to run. I wish I remembered the exact trouble, but
         | it was bad enough that I just un-installed it in favor of `nvm`
         | for node versioning, and never looked back.
        
           | PKop wrote:
           | n is still the simplest node version manager I've come across
           | [0]. Maybe worth checking out if you're looking for an
           | alternative.
           | 
           | I also use the companion n-install [1] utility to get setup
           | very quickly.
           | 
           | [0] https://github.com/tj/n
           | 
           | [1] https://github.com/mklement0/n-install
        
       | TheRealPomax wrote:
       | Would be nice if, instead of a poem, the main page showed a
       | representative example so folks can get an impression of what
       | it's actually like.
        
       | koolk3ychain wrote:
       | Asdf is fantastic for forcing versions of elixir, especially
       | since no native version control exists for the elixir vm itself.
       | Tools like this are developer friendly and also easy to introduce
       | and share - I've had nothing but fantastic experiences with Asdf.
        
       | nescioquid wrote:
       | Not the ASDF (https://common-lisp.net/project/asdf/) I was
       | expecting.
        
         | Snarwin wrote:
         | Not the Advanced Scientific Data Format either.
         | 
         | https://github.com/asdf-format/asdf
        
         | dj_mc_merlin wrote:
         | Looking up documentation when you have build problems in CL is
         | now very hard. It was already very hard however, so no big
         | deal.
        
       | sergiotapia wrote:
       | asdf makes my life so much easier seriously, it's amazing. Try
       | it!
       | 
       | I have a .tool-versions file in code repo that lists what I need
       | for a project.                   elixir 1.2.3         erlang
       | 1.2.3         nodejs 1.2.3
       | 
       | Whenever I `cd` into the folder, asdf automatically uses the
       | right versions for me. I don't have to worry about anything.
       | Razer sharp scalpel of a tool.
        
         | richjdsmith wrote:
         | Couldn't agree more. asdf has made working across multiple
         | computers and projects dead simple.
        
         | nikolay wrote:
         | The only issue is (was?) that you need to preinstall these
         | unless this has changed in the past year. When I integrated it
         | with direnv [0], I made the missing ones autoinstall.
         | 
         | [0]: https://direnv.net/
        
           | sergiotapia wrote:
           | Correct, you must have them installed so the `cd` into the
           | directory auto switches. But that's a simple `asdf install
           | elixir 1.2.3` boom you're set
        
             | viraptor wrote:
             | Or just `asdf install` - it will handle all the missing
             | versions.
        
               | nikolay wrote:
               | Yeah, that's what the direnv script was doing. You cd and
               | forget!(tm)
        
       | Mathnerd314 wrote:
       | "Please head over the documentation site" is a link back to the
       | site. The ballad links to an old repo (fortunately Github
       | redirects it) The all-plugins page 404's.
       | 
       | After giving up on the website I look at the code. It's a shell
       | script. Wonderful.
       | 
       | I'll stick with Nix any day. Or maybe conda.
        
         | viraptor wrote:
         | Are you browsing with JS turned off? (The page does some JS
         | tricks)
        
           | Mathnerd314 wrote:
           | Indeed, JS was off as it usually is.
        
         | kemayo wrote:
         | Do you have JS enabled? It does seem to be one of those
         | pointlessly-JS SPAs. (Yes, I'm judging them for this choice.)
        
         | vages wrote:
         | The all-plugins page works fine for me, and is no Shell script:
         | https://asdf-vm.com/#/plugins-all
        
       | maqbool wrote:
       | simple and straight forward using this for a while now for BEAM.
        
       | vages wrote:
       | My team is using this, and I have no complaints about it.
        
       | cheph wrote:
       | Conan (https://conan.io/) can do the same thing, and I think it
       | is quite a lot more versatile at doing things like that.
        
       | nikolay wrote:
       | 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
       | 
       | [1]: https://direnv.net/
        
         | ahawkins wrote:
         | Thank you for asdf-hashicorp. We use it at Skillshare.
        
           | nikolay wrote:
           | Thank you! It's nothing special.
        
         | burlesona wrote:
         | Thanks for sharing direnv, I didn't know about that but I've
         | wished for it before. Great find :)
        
           | nikolay wrote:
           | It's a gem, really.
        
         | dnautics wrote:
         | Direnv/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.
        
         | mwudka1 wrote:
         | Thank you for asdf-hashicorp. We use it at HashiCorp.
        
           | nikolay wrote:
           | You're welcome!
        
       | [deleted]
        
       | rdtsc wrote:
       | I am using it for python, erlang, elixir and nodejs. It works
       | great on MacOS so far. I used to use a mix of homebrew versions
       | of those tools and some language-specific install scripts like
       | kerl or pyenv.
       | 
       | One of my favorite things is to quickly start a new shell with a
       | specific version to test something: 'asdf shell python $ver'.
       | 
       | I did try direnv as others mentioned here, but I found it a bit
       | too magical and eventually abandoned it.
        
       ___________________________________________________________________
       (page generated 2021-02-03 23:00 UTC)