Skip to content
This repository was archived by the owner on May 27, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
module(
name = "protoc-gen-validate",
compatibility_level = 1,
repo_name = "com_envoyproxy_protoc_gen_validate",
)

bazel_dep(
name = "bazel_skylib",
version = "1.8.1",
)
bazel_dep(
name = "gazelle",
version = "0.46.0",
repo_name = "bazel_gazelle",
)
bazel_dep(
name = "protobuf",
version = "33.0",
repo_name = "com_google_protobuf",
)
bazel_dep(
name = "re2",
version = "2024-07-02.bcr.1",
repo_name = "com_googlesource_code_re2",
)
bazel_dep(
name = "rules_cc",
version = "0.2.13",
)
bazel_dep(
name = "rules_go",
version = "0.58.3",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to update to 0.59.0, see bazelbuild/bazel-central-registry#6780

repo_name = "io_bazel_rules_go",
)
bazel_dep(
name = "rules_java",
version = "8.16.1",
)
bazel_dep(
name = "rules_proto",
version = "7.1.0",
)
bazel_dep(
name = "rules_python",
version = "1.6.0",
)
# -- bazel_dep definitions -- #

go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.24.0")

go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
go_deps,
"com_github_iancoleman_strcase",
"com_github_lyft_protoc_gen_star_v2",
"org_golang_google_protobuf",
"org_golang_x_net",
)

PYTHON_VERSIONS = [
"3.9",
"3.10",
"3.11",
"3.12",
"3.13",
]

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

[
python.toolchain(
is_default = python_version == PYTHON_VERSIONS[-1],
python_version = python_version,
)
for python_version in PYTHON_VERSIONS
]

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

[
pip.parse(
hub_name = "pgv_pip_deps",
python_version = python_version,
requirements_lock = "//python:requirements.txt",
)
for python_version in PYTHON_VERSIONS
]

use_repo(pip, "pgv_pip_deps")
4 changes: 3 additions & 1 deletion bazel/protobuf.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
load("@bazel_tools//tools/jdk:toolchain_utils.bzl", "find_java_runtime_toolchain", "find_java_toolchain")
load("@bazel_tools//tools/jdk:toolchain_utils.bzl", "find_java_toolchain")
load("@com_google_protobuf//bazel/common:proto_info.bzl", "ProtoInfo")
load("@rules_java//java/common:java_common.bzl", "java_common")
load("@rules_java//java/common:java_info.bzl", "JavaInfo")

# Borrowed from https://github.com/grpc/grpc-java/blob/v1.28.0/java_grpc_library.bzl#L59
# "repository" here is for Bazel builds that span multiple WORKSPACES.
Expand Down
Loading