Skip to content

Commit

Permalink
Remove rules_proto dependency from java_tools
Browse files Browse the repository at this point in the history
This is a blocker for removal of proto rules. Because of this dependency, not everything is loaded from rules repositories and java_tools's cc_proto_library in particular falls back to native rule. See: https://buildkite.com/bazel/google-bazel-presubmit/builds/84956

After the change we need java_tools and rules_java release.

PiperOrigin-RevId: 683066764
Change-Id: Ic978dbb3058d60510f04021a278b6896f26bb754
  • Loading branch information
comius authored and copybara-github committed Oct 7, 2024
1 parent 963e7a2 commit 33d1c6c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
3 changes: 1 addition & 2 deletions src/test/shell/bazel/bazel_java_tools_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ EOF
add_platforms "MODULE.bazel"
add_rules_cc "MODULE.bazel"
add_rules_java "MODULE.bazel"
# TODO - ilist@: point java_tools to protobuf; requires coordinated release of rules_java and java_tools
add_rules_proto "MODULE.bazel"
add_protobuf "MODULE.bazel"
add_rules_license "MODULE.bazel"
}

Expand Down
5 changes: 0 additions & 5 deletions src/test/shell/testenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -586,11 +586,6 @@ function add_rules_python() {
add_bazel_dep "rules_python" "$1"
}

# Needed only for java_tools
function add_rules_proto() {
add_bazel_dep "rules_proto" "$1"
}

function add_rules_license() {
add_bazel_dep "rules_license" "$1"
}
Expand Down
10 changes: 5 additions & 5 deletions tools/jdk/BUILD.java_tools
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
load("@protobuf//bazel:cc_proto_library.bzl", "cc_proto_library")
load("@protobuf//bazel:proto_library.bzl", "proto_library")
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load("@rules_java//java:defs.bzl", "java_import")

package(default_visibility = ["//visibility:public"])

exports_files(glob(["**/*.jar"]))

licenses(["notice"]) # Apache 2.0

load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_proto_library")
load("@rules_java//java:defs.bzl", "java_import")
# TODO - ilist@: point java_tools to protobuf; requires coordinated release of rules_java and java_tools
load("@rules_proto//proto:defs.bzl", "proto_library")

SUPRESSED_WARNINGS = select({
":windows": [],
"//conditions:default": [
Expand Down

0 comments on commit 33d1c6c

Please sign in to comment.