New Versions Of Chocolatey NuGet Packages For Elixir and Erlang

Quite some time ago, I took over maintenance of the Chocolatey NuGet (CNG) packages for both Elixir and Erlang.  I did release new versions of both packages as new versions of Erlang and Elixir became available but I didn’t do a lot of work on either of them.  That changed a little bit today.

One thing that had always kind of annoyed me was the fact that I could take my pick; I could modify people’s paths on their machines without asking or I could tell people that after they installed Erlang and Elixir they’d need to fix up their paths to get Elixir to work “out of the box”.  Neither option seemed particularly good but I decided to go with the latter because I don’t believe in messing around with other people’s machines without explicit permission and I didn’t see anything in the CNG framework to prompt them.

Recently the question of why Elixir doesn’t work “out of the box” came up yet again.  I gave my standard answer and then one of the CNG mods mentioned an option that I’d not heard of before.  CNG now has the ability to create a small shim file to run another command. I say “now has” but this feature may have been in CNG all along; maybe I just never heard of it.

Regardless this is a great approach.  I can create these shims to point to the right bat files and the right exe’s, put the shims in the Chocolatey bin directory which is added to the path by Chocolatey and I get behavior much closer to the behavior that apt-get and homebrew users have been getting for a long time.

So today, I’m pushing up slightly modified CNG packages for both Elixir and Erlang.  Besides adding the shims I also removed some dead code that I had simply been too lazy to remove and I also modified the Erlang uninstall process to fix a long-standing issue.

One thing some people may take some issue with: I have called the shim to iex.bat ielixir. I did this because iex is a command in Powershell and if you’re on Windows, you should be using Powershell for your terminal.  Note that since this is simply a shim, iex.bat is still present and can still be called if anyone cares to.  I realize that on Mac and Linux it’s iex but I think this is important enough to allow this small divergence.  Maybe we could get Mac and Linux to add an ielixir alias to their packages.  After all iex is short for “interactive elixir” so ielixir isn’t totally unreasonable.

I would appreciate it if anyone who uses CNG to install Elixir would take a look at this new package and beat it up a bit.  If you find issues, please let me know via the Github repo. 1.0.5 and 18.0 will continue to be on CNG if you don’t care to make this change.

The packages are Elixir and Erlang 18.0.20150709

Always the way; upload packages, let people know and then realize you forgot to test something.  The corrected packages are Elixir and Erlang 18.0.20150709.2

Thanks to Gary Ewan Park and Rob Reynolds for their help in figuring out the problems I was having with creating the shim files I needed.