-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version compatibility guarantees #1660
Comments
Given the updates to the
We potentially should have gone the first or second routes, but leaned towards being consistent with our codebase's use of |
Sure, I understand the old behavior wasn't correct, but if a user has an older version of another artifact (e.g. the openapi module), they may still be transitively using the method. Updating part of the stack will result in NoSuchMethodError. What I'm suggesting is that the README clarify (in the general case) that there may be binary incompatibilities between artifacts with the same major version. |
The specific case that triggered this for me: having dependencies on
The build tool used 1.28.0 for smithy-model and 1.27.2 for smithy-openapi, leading to the unfortunate missing method. Ha I known binary breakage is allowed, I would've made the build tool more constrained in how it resolves version conflicts 😅 which is why I'm asking about the general promises these libraries make - so that my tooling can be adjusted. |
This is indeed a reasonable concern : the expectation from downstream users of libraries that use the semver versioning pattern is that minor versions are binary backward compatible. Introducing binary incompatible changes should be communicated to downstream users via bumps of major versions. If binary-compatibility is something that AWS is not willing to guarantee between minor versions, it'd certainly be nice to have a warning somewhere in the documentation, so that downstream library authors can take steps to protect their users accordingly. |
Sorry about the break. We should have come up with a different way to address the issue. We won't add a note to the README at this time because it shouldn't happen again, and we will make every reasonable attempt to maintain binary compatibility (i.e., breaking the return method signature is not that). |
@mtdowling thanks! |
Hi! I've tried to upgrade my direct dependency from 1.27.2 to 1.28.0, but I hit a
java.lang.NoSuchMethodError: 'software.amazon.smithy.model.node.ObjectNode software.amazon.smithy.model.traits.ExamplesTrait$Example.getOutput()'
.A bigger stack trace
I checked with mima-cli (a CLI for MiMa, the binary compatibility checking tool mostly used for Scala, but based on Java Classfiles), and it gave me this:
which would make sense, as apparently
getOutput
's return type was wrapped inOptional
: https://github.com/awslabs/smithy/pull/1599/files#diff-7015682a8fef7e05895ae90e58bc42581549813443c572b60aabea9031323c78L136If this library makes no guarantees on binary compatibility between minor versions, perhaps that should be covered in the README?
The text was updated successfully, but these errors were encountered: