I identified [0] the source for much of it (sub-shells and pipes) and began a PR [1], but became bogged down with BATS testing, and then found mise / rtx, so kind of lost interest. Sorry. You can always implement these if you’d like.
[0]: https://github.com/asdf-vm/asdf/issues/290#issuecomment-1383...
asdf hasn't just started getting popular. It's been popular for a long time already. IIRC I started using it ~8 years ago (~2016). asdf has been around since 2014. I believe Mise (rtx) has been around for a couple of years already too.
People will generally change taste and likes/dislikes every few years.
Where-as asdf creates shims that go into the PATH. That way any processes launching processes using normal env rules have asdf applied.
Mise looks well built & is very fast. But it's jaw dropping to me that it's coverage is so drastically lower than asdf.
The main differences are better UX with simpler commands and it not using shims, which means much better performance
Solutions considered include adopting the vfox plugin system or transpiling all asdf plugins to ShellJs.
Now I know that vfox exists.
It sure is great, it is! However, like you, I tend to prefer minimalistic and predictable tools.
That's why I decided to add the small comment in the discussion section of the post, to be fair but also kind of clear that bloating the runtime manager that was supposed to help manage the bloated runtimes and package managers isn't a great idea.
Having said that, if the scope of mise stabilizes and it doesn't turn into a kitchen-sink kind of project, it sure seems sweet!
Why is it based on the Conda ecosystem? Do you happen to know?
I assume it's for portability, but that sounds heavy.
asdf handles tools, not really packages. So asdf would install Python and not Python packages.
I just tried googling it having not really used CL in a while, and apparently it was seo'd to the top of google results too?
(it's bit like Python stealing the name of a CL compiler ...)
I don’t like Nix but I haven’t found anything else that scales along those critical requirements. I don’t think it’s a good idea to simply replace rbenv/nvm/etc with asdf-ruby-plugin and so on - unless your software isn’t intended to leave your development machine?
(Docker for me fails in the opposite direction - fairly miserable to develop with but trivial to deploy.)
Of course it only works if your codebase and tools are all JS-based!
Having worked recently on a project that was mostly TypeScript with some Python, the TS bits were mostly straightforward but the Python was a hassle in both dev and production (I used venv). I can see that asdf might have been handy for development but if it didn't have a good deployment workflow that wouldn't have helped.
ASDF generally doesn't reinvent version management, but wrap and re-use ruby-build, node-build etc.
It fails if your single project is a legacy monster needing four versions of node, two pythons and a handful of javas - but that's not a common use case.
More commonly you have multiple projects, each with a single version of node, python and java. For deployment you only need one of each - it's in development you need five of each when switching between projects.
Devenv seems nice (in fact it’s how I started down this path) but I haven’t found anything it does for me that I can’t get out of flakes - so far.
- steep steep learning curve, so your team is split between those who can understand it and those who have to blindly follow checklists and ask for help when something breaks
- it doesn’t play well on macOS
Agree about the learning curve; but I am going to experience onboarding my coworkers onto using Nix only for developer environments over the next months; I feel the curve is not quite that steep for that limited use case.
Also it plays really nicely on macOS unless you’re trying to share nix config across macOS and Linux which…just fork and move on, it’s not worth it. :)
For a single user with one development machine, simply having say a time-machine backup could be sufficient. I haven't had challenges for personal projects where details mattered. e.g. a Maven pom.xml, or Go modules/packages was sufficient for my needs.
Historically I'd only cared about automating the spec of production environments. Why would I want/need this?
I now recollect once being contacted out of the blue as being a person who might be able diagnose/solve an issue at a company I'd never worked with. They had two dev machines and only one of them could produce a working program. Their team couldn't figure it out. I gave them a rate and arrived on-site. It was a Visual Basic 6 program, so I just took two half days going through every EXE & DLL related to Windows and VB, eventually finding the difference. Tedious but not rocket science. Is it to avoid these cases?
Edit: We have project onboarding instructions where I work. I suppose it could be useful for making those. I don't make them but could appreciate if they used a standard rather than bespoke scheme.
always, golang is overly opinionated regarding where modules and binaries are stored. I don't like that and I've blown my local development environment into pieces because of that (looking at you GRPC, yikes)
But also, imagine that you, like me, need to test Python, Java+Kotlin+Gradle and NodeJS+Angular stuff. Do you really want to install _all that_ natively ? Just for a couple of merge reviews, and even if not, do you _really_ want to install all that natively ? The answer is always, IMHO, a resounding and clear no.
> It was a Visual Basic 6 program, so I just took two half days going through every EXE & DLL related to Windows and VB, eventually finding the difference. Tedious but not rocket science. Is it to avoid these cases?
For example, but also much worst, as mentioned in the OP it's to prevent the very real possibility of crippling your OS's language runtimes and also to stay productive.
At work, because everyone uses Mac, we ended up using Kandji to achieve the same thing: everyone has the same tools and environments, but that is only if you already have to use that due to security audits and stuff like that.
If I had a small company myself I would probably setup everything with Guix as I really like the way it works, more than Nix (though only because I prefer Lisp config files and because Guix doesn't suffer from any polemics like the flake soap opera).
https://learn.microsoft.com/en-us/aspnet/core/grpc/basics?vi...
It is quite helpful. Also incredibly practical when chevking whether Library X will work on an older version.
I do open source and consulting for clients. I deal with a lot of projects, my own and other's.
Thanks all for the replies. And sorry if I'm asking basic questions and should just read the asdf readme. On my custom layout I have to type A-S-R-H to get asdf.
By giving each box it's own home folder vscode in each has only the extensions for that language. E.g I don't have any python extensions in my nodejs box.
Been working like this for a couple of weeks now and it's pretty good.
If I end up breaking a box I can simply delete it and start over.
One project of mine, though, requires a shareable / pseudo-reproducible dev environment. Devbox didn't cut it, and mise especially couldn't have, since it requires some system deps. I went with a Nix Flake, which worked fine, but also started building a special distrobox image for the project, this time udimg Fedora as a base, as I perceived it as more stable. Using it too distrobox still had some issues, but I managed to make a shim/helper that runs `pnpm` from inside the container and that works pretty perfectly. Might be a bit worse on the performance side, though. We'll see.
The problem with this is that docker doesn't like it when not all mounts are found, so within a team it requires something more sophisticated.
That's basically what asdf does, just automated.
Edit: Decided to peruse the code for the python asdf plugin myself and it seems to just use pyenv under the hood anyway, so I guess it's not really a question of what asdf does anyway.
Generally asdf shines when you need more than one system installed - say a html or SQL language server that depends on node in addition to python for your main app.
There are only three for me and I don't have a reason for more in the near future, so I just remember.
> Generally asdf shines when you need more than one system installed
Makes a little more sense to me.
(Note: I like the tool)
> can activate project tooling upon cd’ing into a project folder
this probably can be replicated with zsh hooks: https://zsh.sourceforge.io/Doc/Release/Functions.html#Hook-F...
That example in the article of managing multiple python 2.7 versions sounds like a horror story.
> Is it just me that never even wants to get to the problems that asdf attempts to solve?
You aren't alone, the scenario isn't ideal. However, brew's Python installation on MacOS as are Debian's and Ubuntu's are _extremely_ brittle. You are one cask, formulae or apt package away from needing to do a weekend-long spelunking session or a full blown system re-install if you have deadlines.
PyEnv is a pain to set up, and maintain, which is what I used in the years before as well as after Python 2 was deprecated and projects started slowly migrating to newer python versions.
> That example in the article of managing multiple python 2.7 versions sounds like a horror story.
It is a horror story, but is very common.
Have you tried to install and maintain Java, Kotlin and Graddle installations for a given project although your machine is not primarily a Java, Kotlin, Graddle box? That is a real nightmare, not so much with asdf.vm.
It will manage the JDK for you. Usage is basically this:
# Install a JDK, that version is now default
sdk install java <version>
# Another one, it asks if you want to change the default
sdk install java <another-version>
# List available and installed versions
sdk list java
# Change which one you're using in this shell
sdk use java <version>
That's all.You can also manage Gradle/Maven installations with SDKMAN, but that's not necessary, usually, because most JVM projects include a "wrapper" script which downloads the needed Maven/Gradle version for you.
This works regardless of whether your project also needs Kotlin/Groovy etc. as those are just managed by Gradle/Maven (the only exception I can think of is if you use Kotlin Multiplatform as that will depend on the platform dependencies as well).
So once you know SDKMAN, you can manage any JVM-based project with just this:
sdk use java <jdk-version-used-by-project>
./gradlew build # or ./mvnw package
If you need to do anything else, you should complain to the project authors as this is really all you should need!I've been using python installed using homebrew and haven't found any issues. In homebrew you can install a specific python version like python@3.11 and using venvs avoids most of the issue (I think you can't install packages outside of a venv in python 3.12 or higher).
.. I run everything for a project in a container. Each project then matches perfectly the container actually used in production, so if it works there, it also works on my machine. I just volume mount the project folder into the container so I can't edit files from my IDE, and then pycharm has ok support for remote interpreters.
A couple of moons ago I used Poetry, but gave up on it because it was so heavy and unfortunately would bug out often.
I did try using something similar to asdf (can't remember the name, think it changed), but it still didn't really solve the problem of OS dependencies and things needing to be compiled, and the problems arising from me not running the same OS as the application would run on. A dockerfile solves that, my system is a carbon copy of the prod environment.
Nice in theory but not worth it.