Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inaccuracy: Elm does not enforce semantic versioning #868

Open
not-my-profile opened this issue Sep 10, 2021 · 0 comments
Open

Inaccuracy: Elm does not enforce semantic versioning #868

not-my-profile opened this issue Sep 10, 2021 · 0 comments

Comments

@not-my-profile
Copy link

not-my-profile commented Sep 10, 2021

The homepage currently promotes the following feature:

Enforced Semantic Versioning

Elm detects all API changes automatically thanks to its type system. We use that information to guarantee that every single Elm package follows semantic versioning precisely. No surprises in PATCH releases.

However that's simply not true. An API is more than its types: behavior is also part of an API.

To illustrate this with a simple example:

module MyAPI exposing (..)

{-| Always positive.
-}
maxSize : Int
maxSize = 3

If you insert a - before the 3 and release a new PATCH version: BOOM, you have just broken SemVer!

Elm does not "guarantee that every single Elm package follows semantic versioning precisely". You can intentionally break it and for complex functions you might even break SemVer without realizing it.

Edit: I have since learned that Elm can in fact prevent semantic versioning, as described in elm/compiler#2099. So elm does in fact enforce an incorrect interpretation of semantic versioning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant