Skip to content

Commit

Permalink
bzlmod: Update dependency versions (nanopb#998)
Browse files Browse the repository at this point in the history
get rid of http_archive in MODULE.bazel, upgrade deps
  • Loading branch information
Sayter99 authored Aug 2, 2024
1 parent 7961a93 commit e34dfae
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 2,467 deletions.
14 changes: 7 additions & 7 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
load("@nanopb_pypi//:requirements.bzl", "requirement")
load("@protobuf//:protobuf.bzl", "py_proto_library")

# Note: if you are still using WORKSPACE, you will need to patch this file to use the following instead
# load("@python_3_11//:defs.bzl", "py_binary")
load("@python_versions//3.11:defs.bzl", "py_binary")
load("@nanopb_pypi//:requirements.bzl", "requirement")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_proto_grpc//:defs.bzl", "proto_plugin")
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
load("//extra/bazel:nanopb_cc_proto_library.bzl", "cc_nanopb_proto_library")
load("@rules_python//python/pip_install:requirements.bzl", "compile_pip_requirements")
load("@com_google_protobuf//:protobuf.bzl", "py_proto_library")
load("//extra/bazel:nanopb_cc_proto_library.bzl", "cc_nanopb_proto_library")

package(default_visibility = ["//visibility:public"])

Expand Down Expand Up @@ -82,7 +82,7 @@ proto_library(
"generator/proto/nanopb.proto",
],
strip_import_prefix = "generator/proto/",
deps = ["@com_google_protobuf//:descriptor_proto"],
deps = ["@protobuf//:descriptor_proto"],
)

py_proto_library(
Expand All @@ -104,7 +104,7 @@ py_proto_library(

cc_nanopb_proto_library(
name = "test_compilation",
protos = ["@com_google_protobuf//:descriptor_proto"],
protos = ["@protobuf//:descriptor_proto"],
visibility = ["//visibility:private"],
)

Expand Down
20 changes: 5 additions & 15 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ module(
version = "0.4.9",
)

bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "rules_python", version = "0.31.0")
bazel_dep(name = "rules_proto", version = "5.3.0-21.7")
bazel_dep(name = "protobuf", version = "23.1", repo_name = "com_google_protobuf")
bazel_dep(name = "rules_python", version = "0.34.0")
bazel_dep(name = "rules_proto", version = "6.0.2")
bazel_dep(name = "protobuf", version = "24.4")
bazel_dep(name = "rules_proto_grpc", version = "5.0.0")

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")

Expand All @@ -25,14 +26,3 @@ pip.parse(
python_version = PYTHON_VERSION,
requirements_lock = "@nanopb//:extra/requirements_lock.txt",
)

http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "rules_proto_grpc",
sha256 = "c0d718f4d892c524025504e67a5bfe83360b3a982e654bc71fed7514eb8ac8ad",
strip_prefix = "rules_proto_grpc-4.6.0",
urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/archive/4.6.0.tar.gz"],
)

register_toolchains("@rules_proto_grpc//protobuf:protoc_toolchain")
Loading

0 comments on commit e34dfae

Please sign in to comment.