spicychickensauce

spicychickensauce

Would you like to see Elixir libraries adapt Epoch Semantic Versioning? (poll)

There are many v0 libraries in the elixir echo system, where at least officially, semantic versioning means nothing.
However, it seems to be very common to treat the x in v0.x.y as the major version, which allows for small but regular breaking changes. These projects are essentially doing 0.MAJOR.{MINOR + PATCH}.
Also, many v1 projects then avoid doing even minor braking changes, since that would mean they would have to go to v2, and they want to reserve v2 only for big, major changes. Or worse, they might even “sneak in” breaking changes without bumping the major version.

This is exactly the scenario described in Epoch Semantic Versioning. In that article, Anthony Fu makes a great case for why adapting Epoch Semantic Versioning would be a huge improvment for everyone.

Here are a couple of version numbers for some project, if they would start to follow epoch versioning:

package version
phoenix_live_view (would have been v20 before v1k) 1_021.1.7
floki 38.0.0
gettext 26.2.0
postgrex 21.1.0

Also, some currently v2 projects like phoenix_pubsub might “still” be on v1_002, since maybe the breaking change that motivated going to v2 would not have felt like it would warrant bumping the epoch.

My main point is that I think epoch semantic versioning is much better at communicating intent, while at the same time keeping all the benefits of strictly following semantic versioning.
Plus, since it is fully compatible with normal sematic versioning, all the tools we have like hex and mix already handle it correctly.

Would you like to see libraries adapt Epoch Semantic Versioning?

  • Yes
  • No
  • I don’t care
0 voters

Most Liked

sanswork

sanswork

Currently pretty much every maintainer has such a different idea of what constitutes a major/minor/patch change that I don’t really trust any version number to be insightful about the size of the change or difficulty updating to the new version until I’ve followed a library for a while and have seen several releases from the same person. As soon as you add a new standard for versioning someone will question if something really is a major enough breaking change or not or if they’ve been stuck on one epoch for too long or long enough and we’re back at the exact same situation as current.

DaAnalyst

DaAnalyst

Also, my view is that it’d be better if a version was comprised of 4 numbers instead of 3:

<marketing/product version>.<breaking changes>.<feature add-on>.<fix>

BartOtten

BartOtten

Making my point. Both were breaking in their early existence.

If you have found the new better interface, I bet it is to be named distinctly.

Because a better interface automatically leads to a better name? When I switch the argument order, there is no need for a new name and it would be worse to give it a ‘forced’ new name while the ‘old’ one was perfectly describing the function in the shortest way.

Plant warning for obsoletion

Again: in new libs it is polution imho . Break early and take the penalty. Once you are ‘too big to fail’ there will be enough times you have to ‘polute’ the code base with functions obsoletion. Just as you can see in both examples you provided. Breaking-strategy when small, obsoleting when larger.

That’s all I gotta say. Back on topic: epoch semver!

dimitarvp

dimitarvp

I am with you here:

  1. Epoch SemVer does not seem to tackle the nastiest problem and you outlined it well: how do we not do a major version bump if we changed 1-2 functions? (This of course assumes we had to and it was not a capricious whim.)
  2. Early on the libraries must be allowed to break the API / contract. I think many people, myself included, expect the 0.X.Y versions to be unstable and that any unattended upgrade is at your own risk. This is a compromise with by-the-book SemVer but that’s also a criticism to those who invented it: they did not think of that use-case, and it’s a very common use-case.

I am about to release a library in a few more weeks. I will enlist at least two LLMs to criticise structure and naming and general contracts and function locations. I’ll ask them to be ruthless and will consider each bit of info they give me. I’ll also take one final look myself after.

But the top of the README.md will contain something like the following:

### Compatibility promise

For the moment: none. Note that the library is currently in its `v0` iteration. Once the author feels it has been used enough time and by enough people that the contract is not confusing to users and looks stable, `v1` and on will be released which will then lead to a firmer compatibility promise. In the meantime please always check the changelog before upgrading! Breaking changes will be explicitly marked as such.
FlyingNoodle

FlyingNoodle

Semver explicitly allows breaking changes below v1:

Where Next?

Popular in Polls Top

AstonJ
Do you have any favourites? (You can pick up to three) poll See post below for details:
New
AstonJ
We had a thread here recently that mentioned webservers in PHP, and it got me curious about the options in the BEAM world and what everyo...
New
New
jaimeiniesta
Alchemists everywhere! Join our poll to see what countries have the most Elixir developers! (Please note if you voted in the original po...
New
germsvel
:wave: hi there! I’m the creator of Testing LiveView. Now that the course is finished, I’m thinking of creating another one. But I’d lik...
New
hst337
Do you use hot-reload/recompilation in production? Please note that this poll is only about BEAM’s internal features of runtime upgrades ...
New
matt-savvy
I see some people adopt this convention when naming fields or variables where the value is a boolean. I personally see this as an antipat...
New
AstonJ
Polls are a great way to easily get a snapshot of things, and we’ve had some really interesting polls over the years! Here are some tips...
New
AstonJ
After seeing some of the responses in this thread, I’m curious how much RAM you’re opting for and whether there is any specific reason fo...
New
AstonJ
How often do you buy a new dev machine? poll If there is any particular reason why you’ve settled on the frequency you have, please shar...
New

Other popular topics Top

William
I would like to know that is there any online source for learning Phoenix Framework for building E-Commerce Store? Any advantage on build...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New

We're in Beta

About us Mission Statement