You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Script to automatically update all library versions #65
And just to spam more keywords, here are some Maven commands that display updates but don't make the changes:
mvn versions:display-property-updates
mvn versions:display-dependency-updates
I poked around the web and found some a project for keeping Bazel deps up to date, but it has its own system that might not play well with bazel-common: https://github.com/johnynek/bazel-deps
@ronshapiro it has the resolution logic of Coursier. I can imagine instantiating a custom maven_install for bazel-common, like
maven_install(
name = "bazel_common_maven",
artifacts = # bazel common artifacts,
repositories = # repos,
)
And then downstream libraries will depend on @bazel_common_maven//:com_google_guava_guava and @bazel_common_maven//:junit_junit, for example. They can also declare additional dependencies using their own maven_install declarations, which will be namespaced by the repository name.
Let me know if you have other questions or suggestions for rules_jvm_external.
If I did my testing right, then the BOM doesn't yet cover everything that we'd like it to. But maybe we can help add some libraries, or at least we can use the BOM as our own starting point.
[edit: The commands below are my attempt to generate a list of libraries that bazel-common includes but the BOM does not specify a version for -- neither explicitly (by listing them) nor implicitly (by listing a library that depends on them).]
I just saw 842dd97, which fixes a linkage error, fly by.
(One thing worth noting from that is that some of the artifacts in our list are build tools, not "traditional dependencies" in the narrower sense. If we're lucky, we can easily find compatible versions of all those artifacts, build tools and "traditional dependencies" both. But if not, it would be sufficient to find a set of compatible versions for each individual tool (in addition, of course, to the set for all the "traditional dependencies").)
I see a smallish number of renovate.json files in the third-party section of our internal repository. But I see some evidence that it's used from almost all repos under https://github.com/googleapis, and I see that Google's GitHub admins are willing to grant the needed permissions to the RenovateBot app. So this seems doable.
Activity
ronshapiro commentedon Apr 22, 2019
We could decide to do something with this: https://blog.bazel.build/2019/03/31/rules-jvm-external-maven.html. I'd like to figure out what it does with dependency conflicts first to make sure.
Then we can install that with a private repository name and then wire up processors + exports manually
jin commentedon May 23, 2019
@ronshapiro it has the resolution logic of Coursier. I can imagine instantiating a custom
maven_installfor bazel-common, likeAnd then downstream libraries will depend on
@bazel_common_maven//:com_google_guava_guavaand@bazel_common_maven//:junit_junit, for example. They can also declare additional dependencies using their ownmaven_installdeclarations, which will be namespaced by the repository name.Let me know if you have other questions or suggestions for rules_jvm_external.
cpovirk commentedon Jan 8, 2020
Another thing for us to consider is using the Google Cloud Platform Libraries BOM (Maven central, GitHub). It provides a set of libraries that have been statically checked for linkage errors. This could help us avoid errors like this one (fix) (and maybe there was another error that required this?).
If I did my testing right, then the BOM doesn't yet cover everything that we'd like it to. But maybe we can help add some libraries, or at least we can use the BOM as our own starting point.
[edit: The commands below are my attempt to generate a list of libraries that bazel-common includes but the BOM does not specify a version for -- neither explicitly (by listing them) nor implicitly (by listing a library that depends on them).]
cpovirk commentedon Jan 17, 2020
I just saw 842dd97, which fixes a linkage error, fly by.
(One thing worth noting from that is that some of the artifacts in our list are build tools, not "traditional dependencies" in the narrower sense. If we're lucky, we can easily find compatible versions of all those artifacts, build tools and "traditional dependencies" both. But if not, it would be sufficient to find a set of compatible versions for each individual tool (in addition, of course, to the set for all the "traditional dependencies").)
cpovirk commentedon Oct 8, 2020
Another linkage error fixed in 6db2b87.
cpovirk commentedon Jun 1, 2021
The even easier thing would be automatic updates, like we get from Dependabot for most of our repos.
As of this writing, Dependabot doesn't support Bazel, but RenovateBot does. Note that RenovateBot does not yet support
maven_install, but we are not using that yet.I see a smallish number of
renovate.jsonfiles in the third-party section of our internal repository. But I see some evidence that it's used from almost all repos under https://github.com/googleapis, and I see that Google's GitHub admins are willing to grant the needed permissions to the RenovateBot app. So this seems doable.cpovirk commentedon Sep 25, 2024
I suspect that this will essentially happen automatically if we switch to
rules_jvm_externalor whatever the most standard thing is nowadays.cpovirk commentedon Dec 8, 2025
(We recently set up Dependabot, but that supports only bumping things like
rules_java, not our actual Java dependencies.)