Log Message Versioning Policy
Bodigrim recently posed an
interesting question: Is
adding HasCallStack
a breaking change? The Haskell Package Versioning Policy
(PVP) specifies rules for what must be considered a breaking change, and
it allows the developer to decide if other changes bump the major or
minor version number. Adding a HasCallStack
constraint tends to change error messages, and the PVP does not specify
what should be done in this case.
Many people tend to think about API changes only in the context of
Haskell code. In this case, adding a HasCallStack
constraint does not change the API in a way that can cause a compilation
failure, though there are ways that it might change runtime results.
Note that removing a HasCallStack
constraint could cause
compilation failure, when code that calls the function also has a
HasCallStack
constraint.
In some software, however, I think that it is worthwhile to consider the output of the software as part of the API. For example, the logic in a cron script or an alert rule in a log scanner may depend on the error message. I would bump the major version in such applications, and the applications should have unit tests to alert developers of any significant changes to error messages, perhaps due to changes in dependencies.
In this case, the changes are to partial functions in the bytestring library. Personally, I think that a minor version bump would be fine. I generally do not see alerts or business logic created for development issues such as unsafe usage of partial functions.