-
Notifications
You must be signed in to change notification settings - Fork 23
#24 introduces a breaking change into the cherami library (for yarpc) #25
Comments
In general, you should avoid overusing interfaces everywhere since it makes almost every change a breaking API change, forcing a new semver bump. These articles cover why we shouldn't be overusing interfaces: |
This is only a problem for mock, right? If you prefer, we can bump up the version. |
@datoug From an API perspective, when you define an interface, there's no way to say "this is only for me to implement using my real client and my mock" -- any client code can implement the interface, so modifying the interface is a breaking change from a semver perspective and you would need to cut a new major. Of course cutting new majors causes a lot of churn for service owners, so we should use types that reduce the amount of major revisions we need to make. Even if you provide a mock, modifying an interface is a breaking change. There's a couple of techniques we've used to avoid using interfaces and avoiding breaking changes.
|
Was this releaseed? This is a breaking change - at the very least, it absolutely needs a major version bump. Including this as a minor degrades the utility of semantic versioning for all internal projects. |
Thanks guys. I have bumped up the major version: https://github.com/uber/cherami-client-go/releases/tag/v2.0.0 |
You'll want cut a patch release on 1.x to revert any breaking changes. |
@breerly The latest v1.* release doesn't have that change. Does this work for yarpc? |
You only need to make a patch release on 1.x if breaking changes made their way into 1.x. |
I think we just ran into this again today, was this not reverted on the 1.x branch? |
ack |
When I ran
glide up
in yarpc I started getting test/build errors because of new functions on the cherami consumer interface:#24 introduced two new functions to the consumer interface. There hasn't been a release with these new changes (yarpc is still pointing to the master branch), but once a release goes out with this, all consumer implementations outside the cherami-client-go library will likely have build errors.
It's possible that yarpc is the only library depending on this interface, in which case this is probably ok, unfortunately if any other services/libraries depend on this interface people might start getting some weird build errors. If needed we can follow the semvar (http://semver.org/) rules to customize the versions we release.
cc: @breerly @abhinav
The text was updated successfully, but these errors were encountered: