Skip to content

Commit

Permalink
Rename com_google_protobuf to protobuf
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 681419984
Change-Id: I876b2b42b0949dcf82d0464589621e3b13e28fb1
  • Loading branch information
comius authored and copybara-github committed Oct 2, 2024
1 parent ee7c4ca commit 401ed58
Show file tree
Hide file tree
Showing 17 changed files with 68 additions and 69 deletions.
6 changes: 3 additions & 3 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ pkg_tar(
srcs = [
"//third_party/googleapis:dist_jars",
"//third_party/grpc-java:grpc_jars",
"@com_google_protobuf//:protobuf_java",
"@com_google_protobuf//:protobuf_java_util",
"@com_google_protobuf//:protobuf_javalite",
"@protobuf//:protobuf_java",
"@protobuf//:protobuf_java_util",
"@protobuf//:protobuf_javalite",
"@zstd-jni//:zstd-jni",
],
package_dir = "derived/jars",
Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ bazel_dep(name = "with_cfg.bzl", version = "0.2.4")
bazel_dep(name = "abseil-cpp", version = "20240722.0")

# TODO: wyv@ - use release 29.0 when that's out
bazel_dep(name = "protobuf", version = "29.0-dev", repo_name = "com_google_protobuf")
bazel_dep(name = "protobuf", version = "29.0-dev")
archive_override(
module_name = "protobuf",
integrity = "sha256-zF1Z3SMnHqcP1QKIeAoGGZDEARNXRWRgZi70eKldVlc=",
Expand Down
2 changes: 1 addition & 1 deletion src/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ filegroup(
"@android_gmaven_r8//jar:file",
"@android_tools//:all_android_tools_deploy.jar",
"@bazel_skylib//:WORKSPACE",
"@com_google_protobuf//:LICENSE",
"@protobuf//:LICENSE",
"@remote_coverage_tools//:all_lcov_merger_lib",
"@remote_java_tools//:GenClass",
"@remote_java_tools_darwin_arm64//:java_tools/src/tools/singlejar/singlejar_local",
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/google/devtools/build/lib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ java_library(
"//src/main/protobuf:failure_details_java_proto",
"//third_party:guava",
"//third_party:jsr305",
"@com_google_protobuf//java/core",
"@protobuf//java/core",
],
)

Expand All @@ -222,7 +222,7 @@ java_library(
"//src/main/java/com/google/devtools/build/lib/util/io:io-proto",
"//src/main/java/com/google/devtools/build/lib/util/io:out-err",
"//src/main/protobuf:invocation_policy_java_proto",
"@com_google_protobuf//java/core",
"@protobuf//java/core",
],
)

Expand Down Expand Up @@ -511,8 +511,8 @@ java_library(
"//third_party:gson",
"//third_party:guava",
"//third_party:jsr305",
"@com_google_protobuf//:protobuf_java",
"@com_google_protobuf//java/util",
"@protobuf//:protobuf_java",
"@protobuf//java/util",
"@zstd-jni//:zstd-jni",
],
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library")
load("@protobuf//bazel:proto_library.bzl", "proto_library")
load("@rules_java//java:defs.bzl", "java_proto_library")
load("//tools/build_rules:utilities.bzl", "java_library_srcs")

Expand Down Expand Up @@ -30,8 +30,8 @@ proto_library(
"//src/main/protobuf:command_line_proto",
"//src/main/protobuf:failure_details_proto",
"//src/main/protobuf:invocation_policy_proto",
"@com_google_protobuf//:any_proto",
"@com_google_protobuf//:duration_proto",
"@com_google_protobuf//:timestamp_proto",
"@protobuf//:any_proto",
"@protobuf//:duration_proto",
"@protobuf//:timestamp_proto",
],
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library")
load("@protobuf//bazel:proto_library.bzl", "proto_library")
load("@rules_java//java:defs.bzl", "java_library", "java_proto_library")
load("//tools/build_rules:utilities.bzl", "java_library_srcs")

Expand Down Expand Up @@ -40,7 +40,7 @@ proto_library(
name = "package_metrics_proto",
srcs = ["package_metrics.proto"],
deps = [
"@com_google_protobuf//:duration_proto",
"@protobuf//:duration_proto",
],
)

Expand All @@ -60,7 +60,7 @@ proto_library(
name = "package_load_metrics_proto",
srcs = ["package_load_metrics.proto"],
deps = [
"@com_google_protobuf//:duration_proto",
"@protobuf//:duration_proto",
],
)

Expand Down
20 changes: 10 additions & 10 deletions src/main/protobuf/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@com_google_protobuf//bazel:cc_proto_library.bzl", "cc_proto_library")
load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library")
load("@protobuf//bazel:cc_proto_library.bzl", "cc_proto_library")
load("@protobuf//bazel:proto_library.bzl", "proto_library")
load("@rules_python//python:proto.bzl", "py_proto_library")
load("//third_party/grpc:build_defs.bzl", "java_grpc_library")
load("//third_party/grpc/bazel:cc_grpc_library.bzl", "cc_grpc_library")
Expand Down Expand Up @@ -80,20 +80,20 @@ java_library_srcs(

java_proto_library(
name = "any_java_proto",
deps = ["@com_google_protobuf//:any_proto"],
deps = ["@protobuf//:any_proto"],
)

java_proto_library(
name = "wrappers_java_proto",
deps = ["@com_google_protobuf//:wrappers_proto"],
deps = ["@protobuf//:wrappers_proto"],
)

proto_library(
name = "command_server_proto",
srcs = ["command_server.proto"],
deps = [
":failure_details_proto",
"@com_google_protobuf//:any_proto",
"@protobuf//:any_proto",
],
)

Expand All @@ -110,7 +110,7 @@ java_library_srcs(
proto_library(
name = "failure_details_proto",
srcs = ["failure_details.proto"],
deps = ["@com_google_protobuf//:descriptor_proto"],
deps = ["@protobuf//:descriptor_proto"],
)

java_proto_library(
Expand Down Expand Up @@ -236,10 +236,10 @@ 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",
"@protobuf//:timestamp_proto",
"@remoteapis//:build_bazel_remote_execution_v2_remote_execution_proto",
],
)
Expand Down Expand Up @@ -288,8 +288,8 @@ proto_library(
name = "bazel_output_service_proto",
srcs = ["bazel_output_service.proto"],
deps = [
"@com_google_protobuf//:any_proto",
"@googleapis//google/rpc:status_proto",
"@protobuf//:any_proto",
],
)

Expand Down Expand Up @@ -347,8 +347,8 @@ proto_library(
name = "spawn_proto",
srcs = ["spawn.proto"],
deps = [
"@com_google_protobuf//:duration_proto",
"@com_google_protobuf//:timestamp_proto",
"@protobuf//:duration_proto",
"@protobuf//:timestamp_proto",
],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public ImmutableList<String> getWorkspaceContents(MockToolsConfig config) {
+ bazelPlatformsWorkspace
+ "')",
"local_repository(name = 'local_config_xcode', path = '" + xcodeWorkspace + "')",
"local_repository(name = 'com_google_protobuf', path = '" + protobufWorkspace + "')",
"local_repository(name = 'protobuf', path = '" + protobufWorkspace + "')",
"local_repository(name = 'rules_java', path = '" + rulesJavaWorkspace + "')",
"local_repository(name = 'rules_java_builtin', path = '" + rulesJavaWorkspace + "')",
"local_repository(name = 'android_gmaven_r8', path = '" + androidGmavenR8Workspace + "')",
Expand All @@ -107,7 +107,7 @@ public ImmutableList<String> getWorkspaceContents(MockToolsConfig config) {
public ImmutableList<String> getWorkspaceRepos() {
return ImmutableList.of(
"android_gmaven_r8",
"com_google_protobuf",
"protobuf",
"local_config_platform",
"local_config_xcode",
"internal_platforms_do_not_use",
Expand Down Expand Up @@ -140,7 +140,7 @@ public void setupMockClient(MockToolsConfig config, List<String> workspaceConten
])
""");
config.create("protobuf_workspace/WORKSPACE");
config.create("protobuf_workspace/MODULE.bazel", "module(name='com_google_protobuf')");
config.create("protobuf_workspace/MODULE.bazel", "module(name='protobuf')");
config.overwrite("WORKSPACE", workspaceContents.toArray(new String[0]));
config.overwrite(
"MODULE.bazel",
Expand Down Expand Up @@ -570,22 +570,22 @@ function rlocation() {
alias(
name = "protoc",
actual = "@com_google_protobuf//:protoc",
actual = "@protobuf//:protoc",
)
alias(
name = "javalite_toolchain",
actual = "@com_google_protobuf//:javalite_toolchain",
actual = "@protobuf//:javalite_toolchain",
)
alias(
name = "java_toolchain",
actual = "@com_google_protobuf//:java_toolchain",
actual = "@protobuf//:java_toolchain",
)
alias(
name = "cc_toolchain",
actual = "@com_google_protobuf//:cc_toolchain",
actual = "@protobuf//:cc_toolchain",
)
""");

Expand Down Expand Up @@ -829,7 +829,7 @@ public ImmutableMap<String, NonRegistryOverride> getBuiltinModules(BlazeDirector
.put("platforms", "platforms_workspace")
.put("local_config_platform", "local_config_platform_workspace")
.put("rules_java", "rules_java_workspace")
.put("com_google_protobuf", "protobuf_workspace")
.put("protobuf", "protobuf_workspace")
.put("rules_proto", "third_party/bazel_rules/rules_proto")
.put("build_bazel_apple_support", "build_bazel_apple_support")
.put("local_config_xcode", "local_config_xcode_workspace")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1733,8 +1733,7 @@ protected void useReducedSetOfRules() throws Exception {
helper.writeFile("/workspace/rules_java_workspace/MODULE.bazel", "module(name='rules_java')");
helper.writeFile("/workspace/protobuf_workspace/BUILD");
helper.writeFile("/workspace/protobuf_workspace/WORKSPACE");
helper.writeFile(
"/workspace/protobuf_workspace/MODULE.bazel", "module(name='com_google_protobuf')");
helper.writeFile("/workspace/protobuf_workspace/MODULE.bazel", "module(name='protobuf')");
helper.writeFile("/workspace/local_config_platform_workspace/BUILD");
helper.writeFile("/workspace/local_config_platform_workspace/WORKSPACE");
helper.writeFile(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ public void setUp() throws Exception {
")");
scratch.appendFile(
"WORKSPACE",
"register_toolchains('@com_google_protobuf//:all')",
"register_toolchains('@protobuf//:all')",
"local_repository(",
" name = 'com_google_protobuf',",
" name = 'protobuf',",
" path = 'protobuf_workspace',",
")");
invalidatePackages(); // A dash of magic to re-evaluate the WORKSPACE file.
Expand Down Expand Up @@ -191,7 +191,7 @@ public void blacklistedProtos() throws Exception {
scratch.file(
"x/BUILD",
TestConstants.LOAD_PROTO_LIBRARY,
"cc_proto_library(name = 'any_cc_proto', deps = ['@com_google_protobuf//:any_proto'])");
"cc_proto_library(name = 'any_cc_proto', deps = ['@protobuf//:any_proto'])");

CcCompilationContext ccCompilationContext =
getConfiguredTarget("//x:any_cc_proto").get(CcInfo.PROVIDER).getCcCompilationContext();
Expand All @@ -207,7 +207,7 @@ public void blacklistedProtosInTransitiveDeps() throws Exception {
"proto_library(",
" name = 'foo_proto',",
" srcs = ['foo.proto'],",
" deps = ['@com_google_protobuf//:any_proto'],",
" deps = ['@protobuf//:any_proto'],",
")");

CcCompilationContext ccCompilationContext =
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/google/devtools/build/lib/runtime/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ java_library(
"//third_party:truth",
"//third_party/protobuf:protobuf_java",
"//third_party/protobuf:protobuf_java_util",
"@com_google_protobuf//:protobuf_java",
"@maven//:com_google_testparameterinjector_test_parameter_injector",
"@protobuf//:protobuf_java",
"@remoteapis//:build_bazel_remote_execution_v2_remote_execution_java_proto",
"@zstd-jni",
],
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/google/devtools/build/lib/server/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ java_library(
"//third_party:truth",
"//third_party/grpc-java:grpc-jar",
"//third_party/protobuf:protobuf_java",
"@com_google_protobuf//:protobuf_java",
"@protobuf//:protobuf_java",
],
)

Expand Down
4 changes: 2 additions & 2 deletions third_party/grpc/build_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ _java_grpc_gensource = rule(
default = False,
),
"_protoc": attr.label(
default = Label("@com_google_protobuf//:protoc"),
default = Label("@protobuf//:protoc"),
executable = True,
cfg = "exec",
allow_single_file = True,
Expand Down Expand Up @@ -116,7 +116,7 @@ def java_grpc_library(name, srcs, deps, enable_deprecated = None, visibility = N
Label("//third_party:jsr305"),
Label("//third_party/grpc-java:grpc-jar"),
Label("//third_party:guava"),
"@com_google_protobuf//:protobuf_java",
"@protobuf//:protobuf_java",
] + deps,
**kwargs
)
Expand Down
10 changes: 5 additions & 5 deletions third_party/protobuf/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@ exports_files([

alias(
name = "protoc",
actual = "@com_google_protobuf//:protoc",
actual = "@protobuf//:protoc",
visibility = ["//visibility:public"],
)

alias(
name = "protobuf_java",
actual = "@com_google_protobuf//:protobuf_java",
actual = "@protobuf//:protobuf_java",
visibility = ["//visibility:public"],
)

alias(
name = "protobuf_java_util",
actual = "@com_google_protobuf//:protobuf_java_util",
actual = "@protobuf//:protobuf_java_util",
visibility = ["//visibility:public"],
)

alias(
name = "protobuf_python",
actual = "@com_google_protobuf//:protobuf_python",
actual = "@protobuf//:protobuf_python",
visibility = ["//visibility:public"],
)

alias(
name = "protoc_lib",
actual = "@com_google_protobuf//:protoc_lib",
actual = "@protobuf//:protoc_lib",
visibility = ["//visibility:public"],
)
12 changes: 6 additions & 6 deletions third_party/remoteapis/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ proto_library(
srcs = ["build/bazel/remote/asset/v1/remote_asset.proto"],
deps = [
":build_bazel_remote_execution_v2_remote_execution_proto",
"@com_google_protobuf//:duration_proto",
"@com_google_protobuf//:timestamp_proto",
"@protobuf//:duration_proto",
"@protobuf//:timestamp_proto",
"@googleapis//google/api:annotations_proto",
"@googleapis//google/rpc:status_proto",
],
Expand All @@ -56,10 +56,10 @@ proto_library(
srcs = ["build/bazel/remote/execution/v2/remote_execution.proto"],
deps = [
":build_bazel_semver_semver_proto",
"@com_google_protobuf//:any_proto",
"@com_google_protobuf//:duration_proto",
"@com_google_protobuf//:timestamp_proto",
"@com_google_protobuf//:wrappers_proto",
"@protobuf//:any_proto",
"@protobuf//:duration_proto",
"@protobuf//:timestamp_proto",
"@protobuf//:wrappers_proto",
"@googleapis//google/api:annotations_proto",
"@googleapis//google/api:http_proto",
"@googleapis//google/longrunning:operations_proto",
Expand Down
2 changes: 1 addition & 1 deletion third_party/remoteapis/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ module(

bazel_dep(name = "rules_java", version = "4.0.0")
bazel_dep(name = "rules_proto", version = "4.0.0")
bazel_dep(name = "protobuf", version = "3.19.0", repo_name = "com_google_protobuf")
bazel_dep(name = "protobuf", version = "3.19.0")
bazel_dep(name = "googleapis", version = "0.0.0-20240819-fe8ba054a")
bazel_dep(name = "bazel", version = "", repo_name = "io_bazel")
Loading

0 comments on commit 401ed58

Please sign in to comment.