Skip to content

chore(deps): update dependency rules_java to v9.7.0 - autoclosed - #804

Closed
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/rules_java-9.x
Closed

chore(deps): update dependency rules_java to v9.7.0 - autoclosed#804
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/rules_java-9.x

Conversation

@renovate

@renovate renovate Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Update Change
rules_java http_archive minor 9.6.19.7.0

Release Notes

bazelbuild/rules_java (rules_java)

v9.7.0

Compare Source

Changes since 9.6.1
899c551 Upgrade default JDK to 25.
e06bb23 Return repo_metadata from repository_rules (#​367)
35e8391 Do not percent-encode '+' in classpath-jar manifest Class-Path entries (#​358)
2f57464 Simplify toolchain config for linux (#​357)
c54e911 Create a java_common.compile_header API that just does the header compilation part of java_common.compile
e1c82d4 Internal Change
7b13ead Support disable_lint_checks in java_library
2399899 Internal change
8c82b7f No public description
0508ac3 Support embedding stamping info from bazel in java_single_jar
421776c Attempt to fix missing class error by not using tree artifacts for bootclasspath (#​340)
ec317b1 Remove java_common.add_constraints

MODULE.bazel setup

bazel_dep(name = "rules_java", version = "9.7.0")

WORKSPACE setup

With Bazel 8.0.0 and before 8.3.0, add the following to your file:


### https://github.com/bazelbuild/bazel/pull/26119
common --repositories_without_autoloads=bazel_features_version,bazel_features_globals

In all cases, add the following to your file:

load("@​bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_java",
    urls = [
        "https://github.com/bazelbuild/rules_java/releases/download/9.7.0/rules_java-9.7.0.tar.gz",
    ],
    sha256 = "68794ca344c1caf13dca65f90c06660823013fa080931266e2625103904a664e",
)

http_archive(
    name = "bazel_features",
    sha256 = "a660027f5a87f13224ab54b8dc6e191693c554f2692fcca46e8e29ee7dabc43b",
    strip_prefix = "bazel_features-1.30.0",
    url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.30.0/bazel_features-v1.30.0.tar.gz",
)

load("@​bazel_features//:deps.bzl", "bazel_features_deps")
bazel_features_deps()

load("@​rules_java//java:rules_java_deps.bzl", "rules_java_dependencies")
rules_java_dependencies()

### note that the following line is what is minimally required from protobuf for the java rules
### consider using the protobuf_deps() public API from @​com_google_protobuf//:protobuf_deps.bzl
load("@​com_google_protobuf//bazel/private:proto_bazel_features.bzl", "proto_bazel_features")  # buildifier: disable=bzl-visibility
proto_bazel_features(name = "proto_bazel_features")

### register toolchains
load("@​rules_java//java:repositories.bzl", "rules_java_toolchains")
rules_java_toolchains()

Using the rules
See the source.

Full Changelog: bazelbuild/rules_java@9.6.1...9.7.0


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

fmeum pushed a commit that referenced this pull request Aug 3, 2026
…#810)

## Summary

All `external_test (…, latest, true, …)` CI jobs have been failing since
bazelisk `latest` moved from Bazel 9.1.1 to 9.2.0 (~2026-07-14). This is
what is breaking the currently open renovate PRs #804#808 — in the
failing runs 122 of 123 tests pass; the job fails only on an analysis
error.

Bazel 9.2 makes duplicate constraint values in `target_compatible_with`
a hard analysis-time error. rules_go's
`tests/core/cgo:binary_with_rpath` lists both `@platforms//os:linux` and
`@platforms//os:macos` (OR was intended, AND was written), so analyzing
`@io_bazel_rules_go//tests/core/cgo:all` fails with:

```
ERROR: .../external/rules_go+/tests/core/cgo/BUILD.bazel:346:10: Duplicate constraint values detected:
constraint_setting @@platforms//os:os has [@@platforms//os:linux, @@platforms//os:osx]
```

Under Bazel <= 9.1 the target was silently skipped as
incompatible-everywhere, which is why this only surfaced now. The target
is still broken on rules_go master, so upgrading rules_go (#807/#808)
does not help.

## Changes

- Add `tests/rules_go-fix-binary_with_rpath-constraints.patch`,
rewriting the attribute to the canonical OR idiom (`select` with
`@platforms//:incompatible` default), applied via
`single_version_override` in `tests/MODULE.bazel`. No version pin, so
renovate bumps keep working; the patch applies cleanly to rules_go
0.61.1, 0.62.0 and current master. No test is disabled — on the
contrary, `binary_with_rpath` now actually builds on linux/macos for the
first time.
- Fix the `generate_imported_dylib.sh` invocation in
`run_external_tests.sh`: it has always failed with `cc: fatal error: no
input files` (masked by `|| echo`) because `IMPORTED_C_PATH` is never
set anywhere. Default to the `imported.c` next to the script and output
into the cgo package directory. This was never the CI blocker
(`dylib_test` is tagged `manual` and never runs), but the ERROR line in
every log was a red herring while debugging this.

Follow-up: the proper fix belongs in bazel-contrib/rules_go
(`tests/core/cgo/BUILD.bazel`); the local patch can be dropped once a
fixed rules_go release is available.

## Test plan

Verified locally on macOS arm64 with Bazel 9.2.0:
- Without the patch: reproduced the exact CI failure (43/44 targets
analyzed).
- With the patch: all 44 targets in
`@io_bazel_rules_go//tests/core/cgo:all` analyze cleanly, and
`binary_with_rpath` builds successfully with the LLVM toolchain.
- The fixed dylib prep invocation generates `libimported.dylib` /
`libversioned.*` as intended.
@renovate
renovate Bot force-pushed the renovate/rules_java-9.x branch from 232f93f to 3cac998 Compare August 3, 2026 19:19
helly25 added a commit that referenced this pull request Aug 4, 2026
## Summary

Collects all outstanding renovate dependency upgrades, which were
previously blocked by the Bazel 9.2 / rules_go analysis error fixed in
#810. Each commit is the corresponding renovate PR cherry-picked onto
current master:

| PR | Dependency | Version |
|----|------------|---------|
| #804 | rules_java (WORKSPACE) | 9.6.1 → 9.7.0 |
| #805 | aspect_bazel_lib (WORKSPACE) | 3.5.0 → 3.7.1 |
| #806 | bazel_skylib (MODULE + toolchain/deps.bzl) | 1.9.0 → 1.9.2 |
| #776 | boringssl (MODULE + WORKSPACE) | 0.20260526.0 → 0.20260803.0 |
| #787 | rules_rust (MODULE) | 0.70.0 → 0.73.0 |
| #807 | io_bazel_rules_go (WORKSPACE) | 0.61.1 → 0.62.0 |
| #808 | rules_go (MODULE) | 0.61.1 → 0.62.0 |

Those PRs can be closed once this merges (renovate should detect the
versions are present).

## Verification (local, macOS arm64, Bazel 9.2.0, bzlmod)

- `@io_bazel_rules_go//tests/core/cgo:all`,
`@rules_rust//test/unit/{interleaved_cc_info,native_deps}:all`,
`@boringssl//...` and `//foreign:pcre` all analyze cleanly (106 targets)
— confirming the #810 rules_go patch applies to 0.62.0 and the boringssl
patch applies to 0.20260803.0.
- The test targets excluded in `run_external_tests.sh` all still exist
under rules_rust 0.73.0 / rules_go 0.62.0, so target-pattern expansion
stays valid.

Note: rules_go 0.62.0 has a known Bazel 9 issue with duplicate mingw
constraints in its windows cgo platforms (bazel-contrib/rules_go#4665);
it should not trigger here since nothing targets Windows, but flagging
it in case CI says otherwise.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate renovate Bot changed the title chore(deps): update dependency rules_java to v9.7.0 chore(deps): update dependency rules_java to v9.7.0 - autoclosed Aug 4, 2026
@renovate renovate Bot closed this Aug 4, 2026
@renovate
renovate Bot deleted the renovate/rules_java-9.x branch August 4, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants