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

arcanemachine
This was the first question on my mind when I saw this other thread by @AstonJ. I’m curious how many Phoenix users actually like using T...
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
AstonJ
Do you use Dialyzer/Dialyxir in your Elixir projects? poll If you only use it in some of them, which ones? If you don’t use it, why not...
New
josefrichter
There are two polls and a third question… 1) Displays poll 2) Orientation poll 3) Configuration Please let us know how you are using you...
New
AstonJ
What is your primary dev OS? And is there any software you’d like to recommend that could make development easier? (Apart from the code e...
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
spicychickensauce
There are many v0 libraries in the elixir echo system, where at least officially, semantic versioning means nothing. However, it seems t...
New
AstonJ
Following on from a conversation in the Tidewave thread - how useful do you think AI dev tools are right now and how useful do you think ...
New
ryanswapp
I think it would be interesting to see how most people are using Phoenix in production. Do you use it as an API backend for a SPA? Or do ...
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

Other popular topics Top

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
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
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New

We're in Beta

About us Mission Statement