Hey everone! Recently I’ve started updating the dependencies of my Elixir packages, to ensure they all are up-to-date. Some of these were still written in the time of Elixir v1.2.x.
Currently, we are of course at version 1.8.1.
So here are two question to you, dear community:
Are you still stuck on older Elixir versions? If so, why and which one(s)?
When building a library, what versions of Elixir should be supported at least? Is it okay to only support the latest Elixir version? If not, how long should we keep supporting earlier versions? Or should we strive to, if at all possible, support all earlier versions?
In general I support the version from time I have created library and do not update minimal version as long as it do not interfere with what I am trying to do. It would be helpful though if there would be a tool to detect minimal supported version which I could add to my CI pipeline to prevent versions mismatches.
in Travis you can run your test suite on many different Elixir versions.
This is how I found out that I am now, while upgrading dependencies, often no longer able to support elixir v1.2 (but I personally think that that version is now old enough to leave behind).
Currently, my plain test
.travis.yml configuration looks like this:
A lot of libraries seem to only support the last 3 minors (so 1.6 1.7 and 1.8). Upgrades of elixir versions are usually very easy so I think that’s fine. Iirc the formatter was also introduced in 1.6 so that was a huge leap. I also see a lot of libraries that require OTP 20+ or 19+ (esp. Dev tooling related ones). From that point 1.6+ seems reasonable. Phoenix currently supports 1.4 but the new version seems to require 1.5.1+ so that seems safe to support (assuming a lot of users need Phoenix)
I’m a big fan though of taking semver seriously which means not dropping support without a major version release - most libraries don’t seem to honor that but with the easy upgrade path I can see why.
I haven’t heard of people being stuck on old elixir versions but having data would be nice. Maybe hex could optionally get data about the elixir versions its clients run?
I’ve kept support at elixir 1.5 so far. But it’s gettingk harder since lots of good additions to Calendar and Date in 1.8 make me think about a big bump. Elixir upgrades tend to be very straight forward I’m finding it harder to justify back more than maybe two minor release.
It’s a great question though and I’m curious what other lib Writers do too.