-
Notifications
You must be signed in to change notification settings - Fork 50
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
Document / prefer use of BOM for resolving SDK artifacts #1445
Comments
Hi, thanks for the report. I understand how this would be a good addition to our documentation. I've set this issue as standard priority ( |
Raised #1508 yesterday which is related to this one. If that one doesn't go ahead, I think it's work mentioning that even with the BOM included, you might need to pay attention to some transitive dependencies being controlled by other BOMs (e.g OkHttp being managed by Spring in a Spring Boot app) |
The "Create project build files" page now recommends the BOM approach by default. |
|
@lauzadis this is progress, but not fully there - for example, the "version catalog" section doesn't mention the BOM. Referencing multiple artifacts from a version catalog doesn't provide the same constraints that the BOM does - any of those artifacts could have its resolved version adjusted, leaving it out of sync with others with potential impacts. It also states:
...which is incorrect. Version catalogs are merely a suggestion, they don't enforce synchronization - that's what the BOM is for. Gradle doc references:
Reference: https://docs.gradle.org/current/userguide/version_catalogs.html |
Combining version catalogs for discovery/naming and BOM for constraints would be:
This would ensure that consumers always receive a single/synchronized SDK version, even in the face of dependency conflict resolution, for top level artifacts. Transitive dependencies appear to be missing from the BOM (that's #1508). |
Thanks @cloudshiftchris for the feedback, I'll take a look at clarifying the docs, probably combining both sub-sections into one. |
Describe the issue
Currently the documentation here does not show or mention the BOM. Using the BOM should be the default / recommended approach, as it encapsulates the version constraints.
For example, using the BOM will prevent users from specifying different versions - perhaps accidentally or incidentally - for different service client dependencies (and perhaps other runtime dependencies such as http clients). This can happen even with the version catalog, as those versions are merely an input into dependency resolution (not a constraint) - other components (perhaps transitive dependencies) could specify a higher version of a specific JAR, leading to misalignment and subsequent quirky runtime behaviour.
The AWS Java SDK documents using the BOM here (also in other pages for Maven etc).
Links
https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup-create-project-file.html
The text was updated successfully, but these errors were encountered: