From b8b99d0c34fe2bd0e92904650eac1cafeeedf253 Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Sat, 23 Mar 2024 16:50:26 +0100 Subject: [PATCH] chore(bazel): add MODULE.bazel files for bzlmod Signed-off-by: Matthieu MOREL --- MODULE.bazel | 39 +++++++++++++++++++ WORKSPACE | 3 +- WORKSPACE.bzlmod | 0 src/google/protobuf/stubs/BUILD.bazel | 2 +- .../protobuf/util/converter/BUILD.bazel | 8 ++++ 5 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 MODULE.bazel create mode 100644 WORKSPACE.bzlmod diff --git a/MODULE.bazel b/MODULE.bazel new file mode 100644 index 0000000..2440806 --- /dev/null +++ b/MODULE.bazel @@ -0,0 +1,39 @@ +module( + name = "proto-converter", +) + +bazel_dep( + name = "abseil-cpp", + version = "20240116.2", + repo_name = "com_google_absl", +) +bazel_dep( + name = "bazel_skylib", + version = "1.3.0", +) +bazel_dep( + name = "googletest", + version = "1.13.0", + repo_name = "com_google_googletest", +) +bazel_dep( + name = "platforms", + version = "0.0.9", +) +bazel_dep( + name = "protobuf", + version = "26.0.bcr.1", + repo_name = "com_google_protobuf", +) +bazel_dep( + name = "rules_cc", + version = "0.0.9", +) +bazel_dep( + name = "rules_pkg", + version = "0.7.0", +) +bazel_dep( + name = "rules_proto", + version = "5.3.0-21.7", +) \ No newline at end of file diff --git a/WORKSPACE b/WORKSPACE index 78ef765..a9b3fb0 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -18,7 +18,7 @@ googletest_deps() http_archive( name = "com_google_protobuf", sha256 = "aa61db6ff113a1c76eac9408144c6e996c5e2d6b2410818fd7f1b0d222a50bf8", - strip_prefix = "protobuf-315ffb5be89460f2857387d20aefc59b76b8bdc3", # 5.31.2023 + strip_prefix = "protobuf-315ffb5be89460f2857387d20aefc59b76b8bdc3", # 5.31.2023 urls = ["https://github.com/protocolbuffers/protobuf/archive/315ffb5be89460f2857387d20aefc59b76b8bdc3.tar.gz"], ) @@ -35,4 +35,3 @@ http_archive( load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") protobuf_deps() - diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod new file mode 100644 index 0000000..e69de29 diff --git a/src/google/protobuf/stubs/BUILD.bazel b/src/google/protobuf/stubs/BUILD.bazel index a7b8c82..238b05b 100644 --- a/src/google/protobuf/stubs/BUILD.bazel +++ b/src/google/protobuf/stubs/BUILD.bazel @@ -20,7 +20,7 @@ load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix") load("//build_defs:cpp_opts.bzl", "COPTS", "LINK_OPTS") package( - default_visibility = ["//:__subpackages__"], + default_visibility = ["//:__subpackages__"], ) cc_library( diff --git a/src/google/protobuf/util/converter/BUILD.bazel b/src/google/protobuf/util/converter/BUILD.bazel index bff9574..6ab8066 100644 --- a/src/google/protobuf/util/converter/BUILD.bazel +++ b/src/google/protobuf/util/converter/BUILD.bazel @@ -79,6 +79,7 @@ cc_library( ":utility", "//src/google/protobuf/stubs", "//src/google/protobuf/util/converter:port_def", + "@com_google_absl//absl/container:flat_hash_set", ], ) @@ -137,6 +138,7 @@ cc_library( "@com_google_absl//absl/status", "@com_google_absl//absl/strings", "@com_google_protobuf//:protobuf", + "@com_google_protobuf//third_party/utf8_range:utf8_validity", ], ) @@ -194,6 +196,8 @@ cc_library( deps = [ ":utility", "//src/google/protobuf/stubs", + "@com_google_absl//absl/container:flat_hash_map", + "@com_google_absl//absl/container:flat_hash_set", "@com_google_protobuf//:protobuf", ], ) @@ -238,6 +242,9 @@ cc_library( ":type_info", ":utility", "//src/google/protobuf/stubs", + "@com_google_absl//absl/container:btree", + "@com_google_absl//absl/container:flat_hash_map", + "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/strings", "@com_google_protobuf//:protobuf", ], @@ -295,6 +302,7 @@ cc_library( deps = [ ":constants", "//src/google/protobuf/stubs", + "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/strings", "@com_google_protobuf//:protobuf", ],