I just updated a package to work with Elm 0.19. The final step is to publish and I have a question about versioning.
In my case the public API has not changed, so
elm bump interprets it to be a PATCH level change.
Question: Is it true that in this case, the right approach is to publish a PATCH level change, even though it is in fact a “breaking” change in the sense that the new code will only compile with Elm 0.19?
The version numbers should just keep going with 0.19, so it looks like your next version should be 2.0.2 or higher.
I’m interpreting that to mean that package versioning is exclusively about the public API. I think I understand the reasoning for that - if the versioning were also used to distinguish compatibility with different Elm versions, it would cause a confusing interaction with the API versioning:
For example, if my current Elm 0.18 package is
3.0.1, and then I bump to version
4.0.0 for Elm 0.19, then what would happen if I wanted to backport a breaking API change to the Elm 0.18 branch? I could not bump it to version
4.0.0, since that MAJOR version is already taken by Elm 0.19. In theory could bump it to
5.0.0, but then we have interleaved MAJOR versions for different Elm versions. A breaking API change for the Elm 0.19 package would then need to go from
6.x, and so on. Making sense of the available versions would be difficult for package users.
So limiting versioning to API changes makes sense, but therefore I have no way to signal “If you update this package from version
<= 3.0.1 to
>= 3.0.2 then you will only be able to compile your project with Elm 0.19.” I think the best I can do is to put that note on the
CHANGELOG. But it would be great to know if there are other steps to take.