deps: Update dependency rules_jvm_external to v7#753
Conversation
📝 WalkthroughWalkthroughThe PR updates the Bazel Java toolchain MODULE to use ChangesBazel Dependency Version Bump
Possibly related PRs
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
05116c3 to
4632bbc
Compare
4632bbc to
2dcd178
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@third_party/java/toolchains.MODULE.bazel`:
- Line 2: You updated the bazel_dep entry bazel_dep(name = "rules_jvm_external",
version = "7.0") but did not repin the Maven lock file; regenerate the
maven_install.json lockfile used by rules_jvm_external (i.e., run the
rules_jvm_external pinning/lock generation workflow to produce an updated
maven_install.json compatible with v7.0), replace the existing lockfile with the
regenerated one, and commit the updated maven_install.json so the repo and the
new bazel_dep version are consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0f91fc20-555e-45b6-a1f0-ea177e3cf05d
⛔ Files ignored due to path filters (1)
MODULE.bazel.lockis excluded by!**/*.lock
📒 Files selected for processing (1)
third_party/java/toolchains.MODULE.bazel
| @@ -1,2 +1,2 @@ | |||
| bazel_dep(name = "rules_java", version = "9.6.1") | |||
| bazel_dep(name = "rules_jvm_external", version = "6.9") | |||
| bazel_dep(name = "rules_jvm_external", version = "7.0") | |||
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Verify Bazel version, Java version, and check for lock files
echo "=== Checking Bazel version ==="
# Check .bazelversion file for pinned Bazel version
if [ -f .bazelversion ]; then
echo "Bazel version pinned in .bazelversion:"
cat .bazelversion
else
echo "No .bazelversion file found"
fi
# Check MODULE.bazel for any Bazel version constraints
if [ -f MODULE.bazel ]; then
echo -e "\nChecking MODULE.bazel for Bazel version constraints:"
rg -n "bazel_compatibility|compatibility" MODULE.bazel || echo "No Bazel compatibility constraints found"
fi
echo -e "\n=== Checking for Java version configuration ==="
# Check for Java toolchain configuration
rg -n "java_runtime|java_toolchain" --type=bazel -C 3
echo -e "\n=== Checking for lock files that may need repinning ==="
# Look for maven_install lock files
fd -e json -e lock . --exec echo "Found lock file: {}"
echo -e "\n=== Checking for workspace-based rules_jvm_external usage ==="
# rules_jvm_external v7 removed workspace-based dependencies
# Check if WORKSPACE file has rules_jvm_external references
if [ -f WORKSPACE ]; then
rg -n "rules_jvm_external" WORKSPACE && echo "WARNING: Found workspace-based rules_jvm_external usage" || echo "No workspace-based usage found"
fi
if [ -f WORKSPACE.bazel ]; then
rg -n "rules_jvm_external" WORKSPACE.bazel && echo "WARNING: Found workspace-based rules_jvm_external usage" || echo "No workspace-based usage found"
fiRepository: ffortier/mono
Length of output: 1810
Repin maven_install.json after upgrading rules_jvm_external to v7.0.
The Bazel version (9.1.0) and Java version (21) meet the requirements for v7.0. However, the maven_install.json lock file at third_party/java/maven_install.json must be repinned to ensure consistency with the upgraded version.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@third_party/java/toolchains.MODULE.bazel` at line 2, You updated the
bazel_dep entry bazel_dep(name = "rules_jvm_external", version = "7.0") but did
not repin the Maven lock file; regenerate the maven_install.json lockfile used
by rules_jvm_external (i.e., run the rules_jvm_external pinning/lock generation
workflow to produce an updated maven_install.json compatible with v7.0), replace
the existing lockfile with the regenerated one, and commit the updated
maven_install.json so the repo and the new bazel_dep version are consistent.
2dcd178 to
a5e46cc
Compare
This PR contains the following updates:
6.9→7.0Release Notes
bazelbuild/rules_jvm_external (rules_jvm_external)
v7.0Compare Source
Please note The lock file format was changed in
rules_jvm_external5.1 and in 6.10. If you update and repin your dependencies, your lock file will use the new format.Usage
This version of
rules_jvm_externalrequires Bazel 7.7.1 or Bazel 8.6.0 or Bazel 9.This release requires Java 11 or above to run, both as the host JDK and the build and tool JDK.
Bzlmod
In your
MODULE.bazelfile:To add dependencies, later in your
MODULE.bazelfile:Using dependencies
In your
BUILD.bazelfile, reference the targets directly:What's Changed
toml.bzlfor TOML parsing by @shs96c in bazel-contrib#1540New Contributors
Full Changelog: bazel-contrib/rules_jvm_external@6.10...7.0
v6.10Compare Source
Please note The lock file format was changed in
rules_jvm_external5.1 and again in 6.10. If you update and repin your dependencies, your lock file will use the new format.Usage
This version of
rules_jvm_externalrequires Bazel 6.5.0, Bazel 7.6.1 or Bazel 8.5.0 or Bazel 9.This release requires Java 11 or above to run, both as the host JDK and the build and tool JDK.
Bzlmod
If you are using Bazel 7 or above, in your
MODULE.bazelfile:To add dependencies, later in your
MODULE.bazelfile:Workspace-based builds
In your
WORKSPACEfile, add:Then, later in your
WORKSPACEfile, you can pull in dependencies from a maven repository:Using dependencies
In your
BUILD.bazelfile, reference the targets directly:What's Changed
ba7310cby @ahumesky in bazel-contrib#1297amend_artifactfor explicit unset state by @JonathanPerry651 in bazel-contrib#1499COURSIER_SHA256environment variable by @albertocavalcante in bazel-contrib#1527New Contributors
Full Changelog: bazel-contrib/rules_jvm_external@6.9...6.10
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate.