Skip to content
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

Update rules_jvm_external 6.3 -> 6.5 #19129

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

jin
Copy link
Contributor

@jin jin commented Nov 5, 2024

Fixes java_export loading with RJE and Bazel 8.

with 6.3:

$ USE_BAZEL_VERSION=8.0.0rc2 bazelisk query //java/core:core_mvn-lib --enable_bzlmod
ERROR: /usr/local/google/home/jingwen/code/protobuf/java/core/BUILD.bazel:169:21: //java/core:lite_mvn-lib: no such attribute 'javacopts' in 'java_library' rule
ERROR: /usr/local/google/home/jingwen/code/protobuf/java/core/BUILD.bazel:169:21: //java/core:lite_mvn-lib: no such attribute 'resources' in 'java_library' rule (did you mean 'features'?)
ERROR: /usr/local/google/home/jingwen/code/protobuf/java/core/BUILD.bazel:169:21: //java/core:lite_mvn-lib: no such attribute 'runtime_deps' in 'java_library' rule
ERROR: /usr/local/google/home/jingwen/code/protobuf/java/core/BUILD.bazel:291:21: //java/core:core_mvn-lib: no such attribute 'javacopts' in 'java_library' rule
ERROR: /usr/local/google/home/jingwen/code/protobuf/java/core/BUILD.bazel:291:21: //java/core:core_mvn-lib: no such attribute 'resources' in 'java_library' rule (did you mean 'features'?)
ERROR: /usr/local/google/home/jingwen/code/protobuf/java/core/BUILD.bazel:291:21: //java/core:core_mvn-lib: no such attribute 'runtime_deps' in 'java_library' rule
ERROR: Evaluation of query "//java/core:core_mvn-lib" failed

with 6.5:

$ USE_BAZEL_VERSION=8.0.0rc2 bazelisk query //java/core:core_mvn-lib --enable_bzlmod
WARNING: For repository 'bazel_skylib', the root module requires module version bazel_skylib@1.7.0, but got bazel_skylib@1.7.1 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'rules_java', the root module requires module version rules_java@7.12.2, but got rules_java@8.2.0 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'rules_python', the root module requires module version rules_python@0.28.0, but got rules_python@0.36.0 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'platforms', the root module requires module version platforms@0.0.8, but got platforms@0.0.10 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'zlib', the root module requires module version zlib@1.3.1, but got zlib@1.3.1.bcr.3 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'proto_bazel_features', the root module requires module version bazel_features@1.17.0, but got bazel_features@1.18.0 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'com_google_googletest', the root module requires module version googletest@1.14.0, but got googletest@1.15.2 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'rules_proto', the root module requires module version rules_proto@4.0.0, but got rules_proto@6.0.2 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
//java/core:core_mvn-lib

Note that build still doesn't work with a different failure mode:

$ USE_BAZEL_VERSION=8.0.0rc2 bazelisk build //java/core:core_mvn --enable_bzlmod
ERROR: no such package '@@protobuf+//': The repository '@@protobuf+' could not be resolved: Repository '@@protobuf+' is not defined
ERROR: /usr/local/google/home/jingwen/code/protobuf/java/core/BUILD.bazel:187:14: every rule of type proto_library implicitly depends upon the target '@@protobuf+//:protoc', but this target could not be found because of: no such package '@@protobuf+//': The repository '@@protobuf+' could not be resolved: Repository '@@protobuf+' is not defined
ERROR: Analysis of target '//java/core:core_mvn' failed; build aborted: Analysis failed
INFO: Elapsed time: 12.522s, Critical Path: 0.04s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
FAILED:
    Fetching repository @@rules_java++toolchains+remote_java_tools; starting

This should also be cherrypicked into 29.x.

@jin jin requested a review from a team as a code owner November 5, 2024 04:52
@jin jin requested review from haberman and removed request for a team November 5, 2024 04:52
@zhangskz zhangskz added the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Nov 21, 2024
@github-actions github-actions bot removed the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Nov 21, 2024
@tonyliaoss tonyliaoss assigned tonyliaoss and zhangskz and unassigned tonyliaoss Nov 21, 2024
@zhangskz
Copy link
Member

@jin Thanks Jin! FYI, you can send these to us directly as internal CL's for main instead which should help with running tests and landing these faster. these changes get imported from Github anyways.

@zhangskz
Copy link
Member

IIRC, we're also waiting on rules_jvm_external 6.6. Is there any value / does this help unblock Bazel 8 to backporting this to 29.x ahead of those addl. fixes?

@jin
Copy link
Contributor Author

jin commented Nov 22, 2024

Is there any value / does this help unblock Bazel 8 to backporting this to 29.x ahead of those addl. fixes?

Yes, it unblocks Bazel 8, at least it fixes this issue incrementally by picking up bazel-contrib/rules_jvm_external#1273.

rules_jvm_external 6.6

Can you confirm what exactly you're waiting for in 6.6? From our end, we are aware of bazel-contrib/rules_jvm_external@3ed7d65 and our rules_android dependency bump.

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.

3 participants