Skip to content

Commit

Permalink
chore(bazel): add MODULE.bazel files for bzlmod
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <[email protected]>
  • Loading branch information
mmorel-35 committed May 12, 2024
1 parent d77ff30 commit b8b99d0
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 3 deletions.
39 changes: 39 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -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",
)
3 changes: 1 addition & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
)

Expand All @@ -35,4 +35,3 @@ http_archive(
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")

protobuf_deps()

Empty file added WORKSPACE.bzlmod
Empty file.
2 changes: 1 addition & 1 deletion src/google/protobuf/stubs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
8 changes: 8 additions & 0 deletions src/google/protobuf/util/converter/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
)

Expand Down Expand Up @@ -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",
],
)

Expand Down Expand Up @@ -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",
],
)
Expand Down Expand Up @@ -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",
],
Expand Down Expand Up @@ -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",
],
Expand Down

0 comments on commit b8b99d0

Please sign in to comment.