bosatsu
bosatsu copied to clipboard
Add a tool to compute semantic version of interface
If the signature is exactly the same they should differ in patch. If the signature of the newer is bigger (always the same for names where there is an overlap) bump the minor. If the two previous aren’t true bump the major.
Explaining the diff is also useful as is a test mode that fails if we bump major or minor depending on inputs.
More ideas here for semver support:
We could also for each package export a dependency API file that says not just what packages it depends on, but what items from those packages (types, data constructors, values) and then use that in a satisfiability check when the semver alone isn't enough to verify correctness.
So, if you have multiple major versions, you go through and see if one or both can satisfy the types given from the dependencies.