[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
pull/9923/head
David L. Jones 3 years ago committed by GitHub
parent 3c5ad8c524
commit 67823fe8dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 30
      BUILD.bazel
  2. 2
      java/core/BUILD.bazel
  3. 1
      java/kotlin-lite/BUILD.bazel
  4. 1
      java/kotlin/BUILD.bazel
  5. 1
      java/util/BUILD.bazel

@ -801,10 +801,13 @@ cc_test(
"src/google/protobuf/**/*", "src/google/protobuf/**/*",
# Files for csharp_bootstrap_unittest.cc. # Files for csharp_bootstrap_unittest.cc.
"conformance/**/*", "conformance/**/*",
]) + glob([ ]) + glob(
[
# Files for csharp_bootstrap_unittest.cc. # Files for csharp_bootstrap_unittest.cc.
"csharp/src/**/*", "csharp/src/**/*",
], allow_empty=True), ],
allow_empty = True,
),
includes = [ includes = [
"src/", "src/",
], ],
@ -1020,10 +1023,6 @@ py_proto_library(
py_library( py_library(
name = "protobuf_python", name = "protobuf_python",
deps = [
":well_known_types_py_pb2",
":python_srcs",
],
data = select({ data = select({
"//conditions:default": [], "//conditions:default": [],
":use_fast_cpp_protos": [ ":use_fast_cpp_protos": [
@ -1031,6 +1030,10 @@ py_library(
":python/google/protobuf/pyext/_message.so", ":python/google/protobuf/pyext/_message.so",
], ],
}), }),
deps = [
":python_srcs",
":well_known_types_py_pb2",
],
) )
# Copy the test proto files from src/google/protobuf to # Copy the test proto files from src/google/protobuf to
@ -1058,8 +1061,8 @@ py_proto_library(
default_runtime = "", default_runtime = "",
protoc = ":protoc", protoc = ":protoc",
srcs_version = "PY2AND3", srcs_version = "PY2AND3",
deps = [":well_known_types_py_pb2"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [":well_known_types_py_pb2"],
) )
py_proto_library( py_proto_library(
@ -1072,8 +1075,8 @@ py_proto_library(
default_runtime = ":protobuf_python", default_runtime = ":protobuf_python",
protoc = ":protoc", protoc = ":protoc",
srcs_version = "PY2AND3", srcs_version = "PY2AND3",
deps = [":python_common_test_protos"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [":python_common_test_protos"],
) )
py_library( py_library(
@ -1139,12 +1142,14 @@ proto_lang_toolchain(
alias( alias(
name = "objectivec", name = "objectivec",
actual = "//objectivec", actual = "//objectivec",
tags = ["manual"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
alias( alias(
name = "protobuf_objc", name = "protobuf_objc",
actual = "//objectivec", actual = "//objectivec",
tags = ["manual"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
@ -1155,7 +1160,7 @@ alias(
genrule( genrule(
name = "generated_protos", name = "generated_protos",
srcs = ["src/google/protobuf/unittest_import.proto"], 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)", cmd = "cat $(SRCS) | sed 's|google/|src/google/|' > $(OUTS)",
) )
@ -1474,7 +1479,8 @@ internal_gen_kt_protos(
# Files included in all source distributions # Files included in all source distributions
pkg_files( pkg_files(
name = "common_dist_files", name = "common_dist_files",
srcs = glob([ srcs = glob(
[
"*.bzl", "*.bzl",
"cmake/*.cmake", "cmake/*.cmake",
"cmake/*.in", "cmake/*.in",
@ -1495,7 +1501,9 @@ pkg_files(
"missing", "missing",
"protobuf*.pc.in", "protobuf*.pc.in",
"test-driver", "test-driver",
], allow_empty = True) + [ ],
allow_empty = True,
) + [
"BUILD.bazel", "BUILD.bazel",
"CHANGES.txt", "CHANGES.txt",
"CMakeLists.txt", "CMakeLists.txt",

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

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

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

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

Loading…
Cancel
Save