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

Fix export of @bazel_tools//src/main/protobuf #11611

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ JAVA_TOOLS = [
"//src/tools/launcher:srcs",
"//src/main/cpp/util:embedded_tools",
"//src/main/native:embedded_tools",
"//src/main/protobuf:srcs",
"//src/main/protobuf:embedded_tools",
"//third_party/def_parser:srcs",
"//third_party/zlib:embedded_tools",
] + select({
Expand Down
9 changes: 9 additions & 0 deletions src/main/protobuf/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,15 @@ filegroup(
srcs = glob(["**"]),
)

filegroup(
name = "embedded_tools",
srcs = glob([
"BUILD.tools",
"*.proto",
]),
visibility = ["//visibility:public"],
)

filegroup(
name = "dist_jars",
srcs = [s + "_java_proto_srcs" for s in FILES] + [
Expand Down
140 changes: 140 additions & 0 deletions src/main/protobuf/BUILD.tools
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
load("@rules_java//java:defs.bzl", "java_proto_library")
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

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

exports_files(
["execution_statitics.proto"],
visibility = [
"//src/test/shell/integration:process_wrapper_test",
],
)

FILES = [
"action_cache",
"android_deploy_info",
"bazel_flags",
"build",
"builtin",
"command_server",
"crosstool_config",
"deps",
"desugar_deps",
"execution_statistics",
"extra_actions_base",
"invocation_policy",
"java_compilation",
"spawn",
"test_status",
"worker_protocol",
]

[proto_library(
name = s + "_proto",
srcs = [s + ".proto"],
) for s in FILES]

[java_proto_library(
name = s + "_java_proto",
deps = [":" + s + "_proto"],
) for s in FILES]

proto_library(
name = "analysis_proto",
srcs = ["analysis.proto"],
deps = [":build_proto"],
)

java_proto_library(
name = "analysis_java_proto",
deps = [":analysis_proto"],
)

proto_library(
name = "analysis_v2_proto",
srcs = ["analysis_v2.proto"],
deps = [":build_proto"],
)

java_proto_library(
name = "analysis_v2_java_proto",
deps = [":analysis_v2_proto"],
)

# This new option tagging method is in flux while being applied to the options
# in the Bazel code base. The visibility should not be changed to allow external
# dependencies until the interface has stabilized and can commit to maintaining
# backwards compatibility for 6 months' time.
# TODO(bazel-team) Make these visibility:public when the interface is stable.
proto_library(
name = "option_filters_proto",
srcs = ["option_filters.proto"],
visibility = ["//visibility:private"],
)

java_proto_library(
name = "option_filters_java_proto",
visibility = ["//src:__subpackages__"],
deps = [":option_filters_proto"],
)

proto_library(
name = "command_line_proto",
srcs = ["command_line.proto"],
visibility = ["//src/main/java/com/google/devtools/build/lib/buildeventstream/proto:__pkg__"],
deps = [":option_filters_proto"],
)

java_proto_library(
name = "command_line_java_proto",
visibility = ["//src:__subpackages__"],
deps = [":command_line_proto"],
)

# Proto needed by singlejar and embedded into the java tools archive.
genrule(
name = "desugar_deps_zip",
srcs = ["desugar_deps.proto"],
outs = ["desugar_deps.zip"],
cmd = "zip -q $@ $<",
visibility = ["//src/tools/singlejar:__pkg__"],
)

filegroup(
name = "desugar_deps_filegroup",
srcs = ["desugar_deps.proto"],
visibility = ["//src/tools/singlejar:__pkg__"],
)

cc_proto_library(
name = "desugar_deps_cc_proto",
deps = [":desugar_deps_proto"],
)

cc_proto_library(
name = "worker_protocol_cc_proto",
deps = [":worker_protocol_proto"],
)

cc_proto_library(
name = "execution_statistics_cc_proto",
deps = [":execution_statistics_proto"],
)

proto_library(
name = "remote_execution_log_proto",
srcs = ["remote_execution_log.proto"],
deps = [
"@com_google_protobuf//:timestamp_proto",
"@googleapis//:google_bytestream_bytestream_proto",
"@googleapis//:google_longrunning_operations_proto",
"@googleapis//:google_rpc_status_proto",
"@remoteapis//:build_bazel_remote_execution_v2_remote_execution_proto",
],
)

java_proto_library(
name = "remote_execution_log_java_proto",
deps = [":remote_execution_log_proto"],
)