Skip to content

Add protoc-gen-validate v1.3.0#6780

Merged
bazel-io merged 1 commit into
bazelbuild:mainfrom
mmorel-35:protoc-gen-validate
Dec 11, 2025
Merged

Add protoc-gen-validate v1.3.0#6780
bazel-io merged 1 commit into
bazelbuild:mainfrom
mmorel-35:protoc-gen-validate

Conversation

@mmorel-35

Copy link
Copy Markdown
Contributor

No description provided.

@bazel-io

Copy link
Copy Markdown
Member

Hello @mering, modules you maintain (protoc-gen-validate) have been updated in this PR.
Please review the changes. You can view a diff against the previous version in the "Generate module diff" check.

@mmorel-35

Copy link
Copy Markdown
Contributor Author

@bazel-io skip_check unstable_url

@bazel-io bazel-io added the skip-url-stability-check Skip the URL stability check for the PR label Dec 11, 2025
@mmorel-35 mmorel-35 marked this pull request as ready for review December 11, 2025 06:33

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request adds version 1.3.0 of the protoc-gen-validate module to the Bazel Central Registry. The changes are well-structured and correctly add the required files for a new module version, including MODULE.bazel, source.json, presubmit.yml, and a patch for compatibility with newer Bazel versions. My review identifies one issue regarding a redundant MODULE.bazel file within an overlay directory. Removing this duplication will improve the maintainability of the module definition. Please see the specific comment for details.

Comment on lines +1 to +93
module(
name = "protoc-gen-validate",
version = "1.3.0",
compatibility_level = 1,
repo_name = "com_envoyproxy_protoc_gen_validate",
bazel_compatibility = ['>=7.2.1'],
)

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",
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")

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.

high

This file is an exact duplicate of modules/protoc-gen-validate/1.3.0/MODULE.bazel. According to BCR practices, the overlay entry in source.json identifies files by their content hash. Since modules/protoc-gen-validate/1.3.0/MODULE.bazel is a required file and has the same content, this file in the overlay directory is redundant.

To simplify the module definition and avoid file duplication, please remove this file and the parent overlay directory. The BCR tooling will use modules/protoc-gen-validate/1.3.0/MODULE.bazel to satisfy the overlay requirement in source.json.

References
  1. The BCR contributing guide indicates that files for an overlay are commonly placed in an overlay directory, but the tooling identifies them by hash. When a required file at the version root (like MODULE.bazel) has the same content and hash, the separate overlay file becomes redundant. Removing it simplifies the module definition. (link)

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

@mering mering left a comment

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.

Thanks!

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.

Please create an upstream PR with this patch. Maintaining downstream patches accumulates to a lot of effort. Thanks!

@mmorel-35 mmorel-35 Dec 11, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There is already one from @meteorcloudy in bufbuild/protoc-gen-validate#1325

@meteorcloudy meteorcloudy added the presubmit-auto-run Presubmit jobs will be triggered for new changes automatically without reviewer's approval label Dec 11, 2025

@bazel-io bazel-io left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All modules in this PR have been approved by their maintainers. This PR will be merged if all presubmit checks pass.

@bazel-io bazel-io merged commit f51ac10 into bazelbuild:main Dec 11, 2025
23 checks passed
@bazel-io bazel-io added the auto-merged This PR is automatically merged by the BCR reviewer bot. label Dec 11, 2025
@mmorel-35 mmorel-35 deleted the protoc-gen-validate branch December 18, 2025 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merged This PR is automatically merged by the BCR reviewer bot. presubmit-auto-run Presubmit jobs will be triggered for new changes automatically without reviewer's approval skip-url-stability-check Skip the URL stability check for the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants