If I’m versioning my package according to the PVP and I add a new data constructor to a type that is exported, then does the PVP require me to do a MAJOR version bump? Or is only a MINOR version bump allowed?
The PVP says (emphasis mine):
A.B is known as the major version number, and C the minor version number. When a package is updated, the following rules govern how the version number must change relative to the previous version:
Breaking change. If any entity was removed, or the types of any entities or the definitions of datatypes or classes were changed, or orphan instances were added or any instances were removed, then the new A.B MUST be greater than the previous A.B. Note that modifying imports or depending on a newer version of another package may cause extra orphan instances to be exported and thus force a major version change.
Non-breaking change. Otherwise, if only new bindings, types, classes, non-orphan instances or modules (but see below) were added to the interface, then A.B MAY remain the same but the new C MUST be greater than the old C. Note that modifying imports or depending on a newer version of another package may cause extra non-orphan instances to be exported and thus force a minor version change.
Does adding a data constructor to an existing type count as changing the definition of a datatype (which would require a major version bump), or adding a new binding (which would require only a minor version bump)?
If anyone is interested in the reason for this question, I’m wondering specifically about the package
JSAsyncFunction constructor is added to the
JSStatement data type, and the release that contained this change did a minor version bump from
This came up while I was trying to update PureScript to a more recent LTS release: https://github.com/purescript/purescript/pull/4199#discussion_r744139266