[ISSUE #10383] Align Bazel WORKSPACE dependencies with Maven pom.xml#10391
Closed
qianye1001 wants to merge 17 commits into
Closed
[ISSUE #10383] Align Bazel WORKSPACE dependencies with Maven pom.xml#10391qianye1001 wants to merge 17 commits into
qianye1001 wants to merge 17 commits into
Conversation
4 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #10391 +/- ##
=============================================
- Coverage 49.01% 48.90% -0.11%
+ Complexity 13485 13455 -30
=============================================
Files 1376 1376
Lines 100527 100537 +10
Branches 12983 12983
=============================================
- Hits 49274 49171 -103
- Misses 45251 45349 +98
- Partials 6002 6017 +15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
use bazel 8.1.0 |
- .bazelversion: 6.5.0 -> 8.1.0 - .bazelrc: add --enable_workspace (required for Bazel 8), remove deprecated --crosstool_top - WORKSPACE: rules_jvm_external 4.2 -> 6.10 (Bazel 8 compatible), update SHA256 and download URL Addresses maintainer @lizhimins feedback: use bazel 8.1.0 PR apache#10391 CI fix round 1/16
- rules_java: 7.12.5 -> 8.6.3 - Updated load paths for rules_java 8.x API - Added proto_bazel_features dependency (required by rules_java 8.x) Fixes bazel-compile CI failure: native.java_proto_library removed in Bazel 8.x PR apache#10391 CI fix round 2/16
…sitive override rules_jvm_external 6.10's rules_jvm_external_deps() transitively declares an older rules_java that uses native.java_proto_library, which was removed in Bazel 8.x. By declaring rules_java 9.0.0 and bazel_features first, Bazel's first-one-wins semantics ensure our compatible version is used.
…rules_jvm_external Move bazel_skylib, proto_bazel_features, and rules_java_toolchains declarations before rules_jvm_external to prevent transitive dependency conflicts in Bazel 8.x. In Bazel 8.x, rules_jvm_external 6.10 transitively pulls older rules_java that uses removed native.java_proto_library. By declaring rules_java 8.6.3 and its dependencies BEFORE rules_jvm_external, we ensure the correct version is used. PR apache#10391 CI fix round 3/16
…el 8.x compat Bazel 8.x enables --incompatible_disallow_empty_glob by default, causing BUILD.bazel glob() calls for optional test resources (certs/*.pem, **/*.yml) to fail when no files match. This single .bazelrc flag avoids modifying 9+ BUILD.bazel files.
org.lz4:lz4-java:1.10.3 does not exist on Maven Central. The correct coordinates are at.yawk.lz4:lz4-java:1.10.3 (matching pom.xml). Updated WORKSPACE and all 15 BUILD.bazel references.
…0 compat rules_jvm_external 6.10 has a transitive dependency on rules_android. Without it declared, Bazel fails with: Repository '@@rules_android' could not be resolved
The release tarball (v0.6.6.tar.gz) was missing BUILD files in rules/ dir. Switch to archive URL with strip_prefix to get the full source tree.
… jdk18on) WORKSPACE already declares bcpkix-jdk18on:1.83 (matching pom.xml), but namesrv/BUILD.bazel still referenced the old jdk15on target.
…version rules_java 9.0.0 calls use_header_compilation_direct_deps() which was removed in Bazel 8.1.0. Let Bazel use its bundled compatible rules_java. Also removes proto_bazel_features and rules_java_toolchains loads.
Bazel 8.1.0's bundled rules_java has broken java/defs.bzl initialization. rules_java 8.13.0 is the latest version compatible with Bazel 8.x and rules_jvm_external 6.10.
Round 11 fix for Bazel 8.1.0 CI: - Downgrade rules_java from 8.13.0 to 7.12.2 (avoids use_header_compilation_direct_deps removal) - Consolidate load statements to use @rules_java//java:repositories.bzl - Add standalone proto_bazel_features.bzl to break dependency cycle (rules_jvm_external 6.10 -> com_google_protobuf -> proto_bazel_features -> rules_java) - Load and register proto_bazel_features before rules_jvm_external setup
…bumps Round 12: Regression strategy - stop fighting rules_jvm_external 6.10 dependency chain. - Revert to rules_jvm_external 4.2 (same as upstream, no protobuf/rules_java cycle) - Keep rules_java 7.12.5 + bazel_skylib 1.8.1 (same as upstream) - Keep Bazel 8.1.0 (.bazelversion) per maintainer request - Only change Maven artifact versions to align with pom.xml - Remove proto_bazel_features.bzl (not needed with rules_jvm_external 4.2) - BUILD.bazel coordinate changes (at.yawk.lz4, jdk18on) preserved from earlier rounds
Round 13: Bazel 8.1.0 bundled rules_cc has cc/toolchains as directory but not as a proper package, causing: Label '@@rules_cc//cc/toolchains:toolchain_config_utils.bzl' is invalid because 'cc/toolchains' is not a package Fix: explicitly declare rules_cc 0.1.1 in WORKSPACE which provides the correct cc/toolchains package structure.
Round 14: The rules_cc declaration at line 150 was too late — @bazel_tools/tools/cpp/cc_configure.bzl references @@rules_cc during repo mapping computation which happens before later WORKSPACE lines are evaluated. Move rules_cc to right after http_archive load.
…cy cycle Round 15: rules_cc 0.1.1 transitively depends on com_google_protobuf for proto compilation, but it was not declared, causing: 'Failed to load Starlark extension @@com_google_protobuf//bazel:cc_proto_library.bzl' and 'cycles detected during computation of main repo mapping'. Added com_google_protobuf 25.3 with protobuf_deps() call before rules_cc declaration to satisfy the dependency chain during repo mapping computation. Bazel 8.1.0 bundled rules_cc has broken cc/toolchains structure (not a package), requiring explicit rules_cc 0.1.1 override. This version needs protobuf as transitive dependency, which must be declared first to avoid cycles.
Contributor
Author
|
🤖 Auto-fix Paused The automated CI fix process has been paused after 15 rounds of attempts. Blocker: Bazel 8.x ecosystem architectural incompatibility
Status: Waiting for maintainer decision on next steps. Possible directions (requires human decision):
The auto-fix system will resume once a decision is made and the PR is updated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.