Skip to content

Inaccuracy: Elm does not enforce semantic versioning #868

Open
@not-my-profile

Description

@not-my-profile

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions