Replies: 1 comment
-
I've done something with this ... at least for the API consumer side! See https://crosshair.readthedocs.io/en/latest/case_studies.html#contractual-semver On the API provider side, I don't have the diffbehavior-like capabilities yet; probably will wait to see how much traction the idea gets overall. Let me know what you think! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to have a CrossHair command like diffbehavior which ensures a changeset is "backwards-compatible" in a contract sense: preconditions can only be weakened and postconditions can only be strengthened.
Then, as an API provider, you could advertise that your minor/patch semver increments are mechanically checked by CrossHair. Pretty cool.
As an API consumer, you could also imagine useful things: perhaps CrossHair could attempt to check your contracts but "force-skip" the library calls. This would allow CrossHair to invent any response satisfying the API's contract. If your contracts still pass, then you know that they'll continue to hold as the underlying library evolves. Also pretty cool.
Beta Was this translation helpful? Give feedback.
All reactions