[Bazel] Fix broken build rules or mark them manual (#9913)

* Fix filename for unittest_gen_import.proto.

* Add 'manual' tags to jvm_export rules so they aren't selected by wildcard

* Run buildifier
This commit is contained in:
David L. Jones 2022-05-04 17:30:23 -07:00 committed by GitHub
parent 3c5ad8c524
commit 67823fe8dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 45 additions and 32 deletions

View File

@ -801,10 +801,13 @@ cc_test(
"src/google/protobuf/**/*",
# Files for csharp_bootstrap_unittest.cc.
"conformance/**/*",
]) + glob([
# Files for csharp_bootstrap_unittest.cc.
"csharp/src/**/*",
], allow_empty=True),
]) + glob(
[
# Files for csharp_bootstrap_unittest.cc.
"csharp/src/**/*",
],
allow_empty = True,
),
includes = [
"src/",
],
@ -1020,10 +1023,6 @@ py_proto_library(
py_library(
name = "protobuf_python",
deps = [
":well_known_types_py_pb2",
":python_srcs",
],
data = select({
"//conditions:default": [],
":use_fast_cpp_protos": [
@ -1031,6 +1030,10 @@ py_library(
":python/google/protobuf/pyext/_message.so",
],
}),
deps = [
":python_srcs",
":well_known_types_py_pb2",
],
)
# Copy the test proto files from src/google/protobuf to
@ -1058,8 +1061,8 @@ py_proto_library(
default_runtime = "",
protoc = ":protoc",
srcs_version = "PY2AND3",
deps = [":well_known_types_py_pb2"],
visibility = ["//visibility:public"],
deps = [":well_known_types_py_pb2"],
)
py_proto_library(
@ -1072,8 +1075,8 @@ py_proto_library(
default_runtime = ":protobuf_python",
protoc = ":protoc",
srcs_version = "PY2AND3",
deps = [":python_common_test_protos"],
visibility = ["//visibility:public"],
deps = [":python_common_test_protos"],
)
py_library(
@ -1139,12 +1142,14 @@ proto_lang_toolchain(
alias(
name = "objectivec",
actual = "//objectivec",
tags = ["manual"],
visibility = ["//visibility:public"],
)
alias(
name = "protobuf_objc",
actual = "//objectivec",
tags = ["manual"],
visibility = ["//visibility:public"],
)
@ -1155,7 +1160,7 @@ alias(
genrule(
name = "generated_protos",
srcs = ["src/google/protobuf/unittest_import.proto"],
outs = ["unittest_gen.proto"],
outs = ["unittest_gen_import.proto"],
cmd = "cat $(SRCS) | sed 's|google/|src/google/|' > $(OUTS)",
)
@ -1474,28 +1479,31 @@ internal_gen_kt_protos(
# Files included in all source distributions
pkg_files(
name = "common_dist_files",
srcs = glob([
"*.bzl",
"cmake/*.cmake",
"cmake/*.in",
"editors/*",
srcs = glob(
[
"*.bzl",
"cmake/*.cmake",
"cmake/*.in",
"editors/*",
# Several of these files are generated by autogen.sh, so using
# glob() lets us ignore them if they are missing. (This is not good
# practice, though.)
"Makefile.in",
"aclocal.m4",
"ar-lib",
"compile",
"config*",
"depcomp",
"install-sh",
"ltmain.sh",
"m4/*.m4",
"missing",
"protobuf*.pc.in",
"test-driver",
], allow_empty = True) + [
# Several of these files are generated by autogen.sh, so using
# glob() lets us ignore them if they are missing. (This is not good
# practice, though.)
"Makefile.in",
"aclocal.m4",
"ar-lib",
"compile",
"config*",
"depcomp",
"install-sh",
"ltmain.sh",
"m4/*.m4",
"missing",
"protobuf*.pc.in",
"test-driver",
],
allow_empty = True,
) + [
"BUILD.bazel",
"CHANGES.txt",
"CMakeLists.txt",

View File

@ -121,6 +121,7 @@ java_export(
resources = [
"//:lite_well_known_protos",
],
tags = ["manual"],
runtime_deps = [":lite"],
)
@ -156,6 +157,7 @@ java_export(
resources = [
"//:well_known_protos",
],
tags = ["manual"],
runtime_deps = [":core"],
)

View File

@ -37,6 +37,7 @@ kt_jvm_export(
maven_coordinates = "com.google.protobuf:protobuf-kotlin-lite:%s" % PROTOBUF_JAVA_VERSION,
pom_template = "//java/kotlin-lite:pom_template.xml",
resources = ["//:well_known_protos"],
tags = ["manual"],
runtime_deps = [
":lite_extensions",
":well_known_protos_kotlin_lite",

View File

@ -59,6 +59,7 @@ kt_jvm_export(
maven_coordinates = "com.google.protobuf:protobuf-kotlin:%s" % PROTOBUF_JAVA_VERSION,
pom_template = "//java/kotlin:pom_template.xml",
resources = ["//:well_known_protos"],
tags = ["manual"],
runtime_deps = [
":bytestring_lib",
":full_extensions",

View File

@ -27,6 +27,7 @@ java_export(
deploy_env = ["//java/core"],
maven_coordinates = "com.google.protobuf:protobuf-java-util:%s" % PROTOBUF_JAVA_VERSION,
pom_template = "pom_template.xml",
tags = ["manual"],
visibility = ["//java:__pkg__"],
runtime_deps = [":util"],
)