Skip to content

Commit

Permalink
Remove validator which depends on gogo
Browse files Browse the repository at this point in the history
  • Loading branch information
mering committed Nov 28, 2023
1 parent 3a574d2 commit a9ee0cb
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 42 deletions.
5 changes: 0 additions & 5 deletions go/dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,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:`org_golang_google_genproto` | `google.golang.org/genproto`_ |
+-------------------------------------------------+-------------------------------------------+
| Pre-generated proto libraries for gRPC and Google APIs. Ideally, |
Expand Down
16 changes: 0 additions & 16 deletions go/private/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -195,22 +195,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.
)

# go_library targets with pre-generated sources for Well Known Types.
# Doesn't belong here, but it would be an annoying source of errors if
# this weren't generated with -proto disable_global.
Expand Down
12 changes: 0 additions & 12 deletions proto/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,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",
],
)

non_go_reset_target(
name = "protoc",
dep = "@com_google_protobuf//:protoc",
Expand Down
2 changes: 0 additions & 2 deletions proto/core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,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.
* ``@org_golang_google_grpc (github.com/grpc/grpc-go``: gRPC support.
* gRPC dependencies

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 a9ee0cb

Please sign in to comment.