2 ms·
The most common need for this kind of thing is when you write software that targets a very specific version of a given binary (e.g. a ruby/python/node interpret
by letmeinhere 4y ago
The most common need for this kind of thing is when you write software that targets a very specific version of a given binary (e.g. a ruby/python/node interpreter) and that version differs from what you have installed globally.
This is often the case when the software you are writing is a web application that has one intended production deployment target, rather than a library or even a shrink-wrapped product that might need to work in diverse installations.
If you just have one of these projects, you can just install the dependency in user-space and update your user's startup files to point to it and be happy. But if you have two or more, or the version changes often (hopefully it does, so you can scoop up security and other updates), then a version manager helps with the toil of swapping back and forth.
Like many of its predecessors, asdf not only gives you a set of commands to swap these versions on demand, but it also creates "shims" to automate this swapping behavior when you enter and exit directories with an appropriate configuration file.
The "killer feature" of asdf (versus rbenv, pyenv, phpenv etc.) is that it is an extendable toolkit that gives you the same tools for dozens, maybe hundreds of different plugins contributed by the community. It is a polyglot web programmer's friend.