Skip to content

Commit

Permalink
Remove unmaintained validators (#3768)
Browse files Browse the repository at this point in the history
  • Loading branch information
mering authored Nov 28, 2023
1 parent 91e3530 commit dcca142
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 46 deletions.
2 changes: 0 additions & 2 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ tasks:
- "-@io_bazel_rules_go//proto:go_grpc"
- "-@io_bazel_rules_go//proto:go_proto"
- "-@io_bazel_rules_go//proto:go_proto_bootstrap"
- "-@io_bazel_rules_go//proto:go_proto_validate"
- "-@org_golang_x_crypto//ed25519:ed25519_test"
- "-@org_golang_x_crypto//sha3:sha3_test"
- "-@org_golang_x_sys//windows/registry:registry_test"
Expand All @@ -149,7 +148,6 @@ tasks:
- "-//proto:go_grpc"
- "-//proto:go_proto"
- "-//proto:go_proto_bootstrap"
- "-//proto:go_proto_validate"
- "-//proto:gostring_grpc"
- "-//proto:gostring_proto"
- "-//proto/wkt:any_go_proto"
Expand Down
5 changes: 0 additions & 5 deletions go/dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@ It also declares some internal repositories not described here.
| This is needed to support both pre-generated and dynamically generated |
| proto libraries. |
+-------------------------------------------------+-------------------------------------------+
| :value:`com_github_mwitkow_go_proto_validators` | `github.com/mwitkow/go-proto-validators`_ |
+-------------------------------------------------+-------------------------------------------+
| Legacy definition for proto plugin. Ideally ``go_rules_dependencies`` should |
| not provide this. |
+-------------------------------------------------+-------------------------------------------+
| :value:`com_github_gogo_protobuf` | `github.com/gogo/protobuf`_ |
+-------------------------------------------------+-------------------------------------------+
| Legacy definition for proto plugins. Ideally ``go_rules_dependencies`` should |
Expand Down
16 changes: 0 additions & 16 deletions go/private/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -196,22 +196,6 @@ def go_rules_dependencies(force = False):
patch_args = ["-p1"],
)

# Extra protoc plugins and libraries.
# Doesn't belong here, but low maintenance.
# releaser:upgrade-dep mwitkow go-proto-validators
wrapper(
http_archive,
name = "com_github_mwitkow_go_proto_validators",
# v0.3.2, latest as of 2023-11-16
urls = [
"https://mirror.bazel.build/github.com/mwitkow/go-proto-validators/archive/refs/tags/v0.3.2.zip",
"https://github.com/mwitkow/go-proto-validators/archive/refs/tags/v0.3.2.zip",
],
sha256 = "d8697f05a2f0eaeb65261b480e1e6035301892d9fc07ed945622f41b12a68142",
strip_prefix = "go-proto-validators-0.3.2",
# Bazel support added in v0.3.0, so no patches needed.
)

# releaser:upgrade-dep gogo protobuf
wrapper(
http_archive,
Expand Down
12 changes: 0 additions & 12 deletions proto/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,6 @@ go_proto_compiler(
],
)

go_proto_compiler(
name = "go_proto_validate",
plugin = "@com_github_mwitkow_go_proto_validators//protoc-gen-govalidators",
suffix = ".validator.pb.go",
valid_archive = False,
visibility = ["//visibility:public"],
deps = [
"@com_github_golang_protobuf//proto:go_default_library",
"@com_github_mwitkow_go_proto_validators//:validators_golang",
],
)

GOGO_VARIANTS = [
"combo",
"gogo",
Expand Down
4 changes: 0 additions & 4 deletions proto/core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,6 @@ Several ``go_proto_compiler`` rules are predefined in

* ``go_proto``: default plugin from github.com/golang/protobuf.
* ``go_grpc``: default gRPC plugin.
* ``go_proto_validate``: validator plugin from
github.com/mwitkow/go-proto-validators. Generates ``Validate`` methods.
* gogoprotobuf_ plugins for the variants ``combo``, ``gofast``, ``gogo``,
``gogofast``, ``gogofaster``, ``gogoslick``, ``gogotypes``, ``gostring``.
For each variant, there is a regular version (e.g., ``gogo_proto``) and a
Expand Down Expand Up @@ -488,8 +486,6 @@ will only be downloaded if proto rules are used.
general proto support.
* ``@com_github_golang_protobuf (github.com/golang/protobuf)``: standard
Go proto plugin.
* ``@com_github_mwitkow_go_proto_validators
(github.com/mwitkow/go-proto-validators)``: validator plugin.
* ``@com_github_gogo_protobuf (github.com/gogo/protobuf)``: gogoprotobuf
plugins.
* ``@org_golang_google_grpc (github.com/grpc/grpc-go``: gRPC support.
Expand Down
1 change: 0 additions & 1 deletion tests/legacy/examples/proto/embed/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ go_proto_library(
name = "embed_go_proto",
compilers = [
"@io_bazel_rules_go//proto:go_proto",
"@io_bazel_rules_go//proto:go_proto_validate",
],
# Note that if you forget the importpath everything will break horribly.
importpath = "github.com/bazelbuild/rules_go/examples/proto/embed",
Expand Down
6 changes: 0 additions & 6 deletions tests/legacy/examples/proto/proto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,3 @@ func TestEmbed(t *testing.T) {
t.Errorf("Unable to call method from embedded go files")
}
}

func TestValidate(t *testing.T) {
if err := embed.OtherThing().Validate(); err != nil {
t.Errorf("Proto did not pass validation")
}
}

0 comments on commit dcca142

Please sign in to comment.