Is asdf still the best way of install Elixir and Erlang on Linux?

Hi,

Is asdf still the best way of installing Elixir and Erlang on a Linux system?

Thanks

Richard

4 Likes

I think so. I have Elixir, Erlang, Java, Nodejs and Rust all installed and managed with asdf.

5 Likes

Nope, it’s slower and with less features than mise. It’s superior in every way, though using asdf is not likely to stop you from developing your project of course.

22 Likes

Having containers with all your dev stuff is just wonderful after you get it all set up. I’m a solo developer and it’s still a win, but it will take you a weekend to iron out all your mount points, editor integrations etc.

1 Like

I did use asdf for a while, but I recently switched over to mise. It feels faster and doesn’t seem to get in my way as much. I may be a weird edge case but I always found that asdf always seemed to insert itself into my workflow and block me on silly things. Granted I could have went and learned asdf a little better, but I prefer my tooling to be straight forward and not get in my way.

10 Likes

For me it is doing the job.

2 Likes

Is that still the case, though? IIRC, they migrated to Go some time ago. I tried mise a while back, and I couldn’t spot that big of a difference. What makes you like mise more than asdf these days - “it’s superior in every way” is kinda broad haha XD

3 Likes

If you’re already using Nix (or open to trying it), this is all you need in a flake.nix:

{
  inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
  outputs = {nixpkgs, ...}: let
    systems = nixpkgs.lib.systems.flakeExposed;
  in {
    devShells = nixpkgs.lib.genAttrs systems (system: let
      pkgs = nixpkgs.legacyPackages.${system};
      beam-pkgs = pkgs.beam.packages.erlang_26;
    in {
      default = pkgs.mkShell {
        inherit (beam-pkgs) elixir erlang;
      };
    });
  };
}

Then nix develop and you’re done. Works the same on Linux and macOS.

13 Likes

I haven’t checked it after the rewrite so, fair call out, thank you.

“Superior in every way” was mostly coming from it having more features that I made use of, really. Maybe “bigger scope” would have been a better formulation.

3 Likes

It depends , I have recently installed Erlang/Elixir on Oracle Linux 8.5 and I had to use Kerl & Kiex because I do not want to risk updating some dependent packages for asdf “Latest one is using Go” in case the older versions is used by other applications

2 Likes

It is still the case, yes, at least imho.

While mise does play with your paths, it doesn’t use “shims” to make things work, which is one less thing to go wrong. Mise’s UX is also a bit more ergonomic and overall it is (still) faster IME.

We’ve moved our entire dev team over to mise, as a result, and it’s been happy times.

One place both asdf and mise have given fits is with the expert LS. They’ve had a few bugs with asdf and mise (and sometimes specific shells used with them), but it turns out that mise provides a good solution: set the LS command to mise exec -- expert --stdio, voila, not more breakages as expert will get the right environment set up for it without it having to figure out what the installer (mise, in this case) has done.

5 Likes

In my opinion, asdf and mise are currently the best way to manage tool chains, and as far as I understand, they both can read the .tool-versions file,

This means, that all members on your team can use the tool they prefer, even though you can not use some of mises specialties.

Another method of tool chain management would be nix, though it really works different, and I also would say, it isn’t something for beginners. It works completely different than any of the other tools and requires either full commitement from the team or constant changes by a single developer to keep the nix defined shell roughly in sync with what the team uses from asdf/mise.

1 Like

asdf and mise both use kerl under the hood for Erlang. If something goes wrong (it has done so twice for me over the years), you’ll be debugging two tools. Now for Erlang I just stick to kerl (or what @ghannam80 said).

1 Like

Mise is really great. I previously used a nix-shell (so from Nix), and while it is fully reproducible… it doesn’t have the awesome developer experience provided by Mise. I find Mise so good, that I introduced it at work in Python, Kotlin and JavaScript projects.

I have a template repository on GitHub for my Mise configuration that I use in new Elixir projects. It also contains a nix-shell, even though I don’t use it anymore.

5 Likes

Nice. I’ve been meaning to replace my Justfiles with mise config and you are giving me a good starting point. Thanks.

2 Likes

You’re welcome. I also used just before, but I found Mise tasks to be just as good (see the pun… :face_with_peeking_eye:)

3 Likes

Is asdf really worth it as I have learned that it’s quite basic and mise as I understand is superior and faster, Should I learn how to use mise?

1 Like

Which of all these tools makes the most sense for you to learn, depends on many factors.

Even though mise is quicker and more powerfull, there is also more to learn. If you do not need the extra functionailtiy, or are not contributing to projects that make the use of mise mandatory, then learning asdf might be easier.

2 Likes

Also for those interested in this thread, be sure to check out our poll:

:023:

1 Like

I used it for a couple of years, and it was totally fine for what I needed, but recently I tried using Mise, and also working fine.

1 Like