Skip to content

Commit 7bca88d

Browse files
meringfeuerste
authored andcommitted
Add protoc-gen-validate 1.2.1.bcr.1 (bazelbuild#3973)
This fixes compatibility with newer versions of rules_python. Same patch was already applied in 1.0.4.bcr.1 (bazelbuild#3420). Also migrate to using overlays instead of a patch.
1 parent f18d582 commit 7bca88d

File tree

5 files changed

+123
-1
lines changed

5 files changed

+123
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
module(
2+
name = "protoc-gen-validate",
3+
version = "1.2.1.bcr.1",
4+
compatibility_level = 1,
5+
repo_name = "com_envoyproxy_protoc_gen_validate",
6+
)
7+
8+
bazel_dep(
9+
name = "bazel_skylib",
10+
version = "1.4.2",
11+
)
12+
bazel_dep(
13+
name = "gazelle",
14+
version = "0.37.0",
15+
repo_name = "bazel_gazelle",
16+
)
17+
bazel_dep(
18+
name = "protobuf",
19+
version = "29.0",
20+
repo_name = "com_google_protobuf",
21+
)
22+
bazel_dep(
23+
name = "re2",
24+
version = "2021-09-01",
25+
repo_name = "com_googlesource_code_re2",
26+
)
27+
bazel_dep(
28+
name = "rules_cc",
29+
version = "0.0.9",
30+
)
31+
bazel_dep(
32+
name = "rules_go",
33+
version = "0.48.0",
34+
repo_name = "io_bazel_rules_go",
35+
)
36+
bazel_dep(
37+
name = "rules_java",
38+
version = "5.5.0",
39+
)
40+
bazel_dep(
41+
name = "rules_proto",
42+
version = "6.0.0",
43+
)
44+
bazel_dep(
45+
name = "rules_python",
46+
version = "0.40.0",
47+
)
48+
# -- bazel_dep definitions -- #
49+
50+
go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
51+
go_sdk.download(version = "1.21.1")
52+
53+
go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
54+
go_deps.from_file(go_mod = "//:go.mod")
55+
use_repo(
56+
go_deps,
57+
"com_github_iancoleman_strcase",
58+
"com_github_lyft_protoc_gen_star_v2",
59+
"org_golang_google_protobuf",
60+
"org_golang_x_net",
61+
)
62+
63+
PYTHON_VERSIONS = [
64+
"3.9",
65+
"3.10",
66+
"3.11",
67+
"3.12",
68+
"3.13",
69+
]
70+
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
71+
[
72+
python.toolchain(
73+
is_default = python_version == PYTHON_VERSIONS[-1],
74+
python_version = python_version,
75+
)
76+
for python_version in PYTHON_VERSIONS
77+
]
78+
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
79+
[
80+
pip.parse(
81+
hub_name = "pgv_pip_deps",
82+
python_version = python_version,
83+
requirements_lock = "//python:requirements.txt",
84+
)
85+
for python_version in PYTHON_VERSIONS
86+
]
87+
use_repo(pip, "pgv_pip_deps")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../MODULE.bazel
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
matrix:
2+
platform:
3+
- debian11
4+
- macos
5+
- macos_arm64
6+
- ubuntu2004
7+
- ubuntu2204
8+
- ubuntu2404
9+
- windows
10+
bazel:
11+
- 7.x
12+
- 8.x
13+
tasks:
14+
verify_targets:
15+
name: Verify build targets
16+
platform: ${{ platform }}
17+
bazel: ${{ bazel }}
18+
build_flags:
19+
- '--cxxopt=-std=c++17'
20+
build_targets:
21+
- '@protoc-gen-validate//bazel/go:pgv_plugin_go'
22+
- '@protoc-gen-validate//validate:cc_validate'
23+
- '@protoc-gen-validate//validate:go_default_library'
24+
- '@protoc-gen-validate//validate:validate_proto'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"url": "https://github.com/bufbuild/protoc-gen-validate/archive/refs/tags/v1.2.1.tar.gz",
3+
"integrity": "sha256-5HGDUnVN8Tk7h5K2MTOKqFYvOQ6BYHg+NlRUvBHZYyg=",
4+
"strip_prefix": "protoc-gen-validate-1.2.1",
5+
"overlay": {
6+
"MODULE.bazel": "sha256-S/CWdrYvpYeuB+BzQgp27Idm3M51ReX4xoz6jkhLUSA="
7+
},
8+
"patch_strip": 1
9+
}

modules/protoc-gen-validate/metadata.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"1.0.4",
1414
"1.0.4.bcr.1",
1515
"1.0.4.bcr.2",
16-
"1.2.1"
16+
"1.2.1",
17+
"1.2.1.bcr.1"
1718
],
1819
"yanked_versions": {}
1920
}

0 commit comments

Comments
 (0)