Skip to content

Commit

Permalink
Vendor: update dependencies (#60)
Browse files Browse the repository at this point in the history
* update vendored dependencies

* fix sha

* no build files in gen'd go directories

* gazelle added an extra go_binary rule
  • Loading branch information
rodaine authored Feb 15, 2018
1 parent 3204975 commit 39f5c47
Show file tree
Hide file tree
Showing 376 changed files with 169,633 additions and 43,015 deletions.
13 changes: 10 additions & 3 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,22 @@ gazelle(

go_binary(
name = "protoc-gen-validate",
embed = [":go_default_library"],
importpath = "github.com/lyft/protoc-gen-validate",
visibility = ["//visibility:public"],
)

go_google_protobuf()

go_library(
name = "go_default_library",
srcs = [
"checker.go",
"main.go",
"module.go",
],
importpath = "github.com/lyft/protoc-gen-validate",
visibility = ["//visibility:public"],
visibility = ["//visibility:private"],
deps = [
"//templates:go_default_library",
"//validate:go_default_library",
Expand All @@ -27,5 +36,3 @@ go_binary(
"//vendor/github.com/lyft/protoc-gen-star:go_default_library",
],
)

go_google_protobuf()
65 changes: 65 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[[constraint]]
name = "github.com/golang/protobuf"
version = "1.0.0"

[[constraint]]
name = "github.com/lyft/protoc-gen-star"
version = "0.3.2"

[[constraint]]
branch = "master"
name = "golang.org/x/net"
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ testcases:
--validate_out="lang=go:./go" \
./*.proto

.PHONY: update-vendor
update-vendor:
# updates the vendored dependencies using the Go Dep tool
dep ensure -update
$(MAKE) gazelle

tests/harness/harness.pb.go:
# generates the test harness protos
cd tests/harness && protoc -I . --go_out=. harness.proto
Expand Down
2 changes: 1 addition & 1 deletion bazel/go_proto_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def go_proto_repositories(shared = 1):
name = "com_github_google_protobuf",
url = "https://github.com/google/protobuf/archive/v3.4.0.tar.gz",
strip_prefix = "protobuf-3.4.0",
sha256 = "cd55ee08e64a86cf12aaadd4672961813f592c194ed0c9ad94da0ec75acf219f",
sha256 = "f6600abeee3babfa18591961a0ff21e7db6a6d9ef82418a261ec4fee44ee6d44",
)

# Needed for gRPC, only loaded by bazel if used
Expand Down
18 changes: 9 additions & 9 deletions tests/harness/executor/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ go_library(
"//tests/harness/cases/other_package:go",
"//vendor/github.com/golang/protobuf/proto:go_default_library",
"//vendor/github.com/golang/protobuf/ptypes:go_default_library",
"//vendor/github.com/golang/protobuf/ptypes/any:go_default_library",
"//vendor/github.com/golang/protobuf/ptypes/duration:go_default_library",
"//vendor/github.com/golang/protobuf/ptypes/timestamp:go_default_library",
"//vendor/github.com/golang/protobuf/ptypes/wrappers:go_default_library",
"//vendor/golang.org/x/net/context:go_default_library",
"@com_github_golang_protobuf//ptypes/any:go_default_library",
"@com_github_golang_protobuf//ptypes/duration:go_default_library",
"@com_github_golang_protobuf//ptypes/timestamp:go_default_library",
"@com_github_golang_protobuf//ptypes/wrappers:go_default_library",
],
)

go_binary(
name = "executor",
importpath = "github.com/lyft/protoc-gen-validate/tests/harness/executor",
library = ":go_default_library",
visibility = ["//visibility:private"],
data = [
"//tests/harness/go:go-harness",
"//tests/harness/cc:cc-harness",
]
"//tests/harness/go:go-harness",
],
embed = [":go_default_library"],
importpath = "github.com/lyft/protoc-gen-validate/tests/harness/executor",
visibility = ["//visibility:private"],
)
18 changes: 9 additions & 9 deletions tests/harness/go/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ go_library(
],
)

go_binary(
name = "go-harness-binary",
importpath = "github.com/lyft/protoc-gen-validate/tests/harness/go",
library = ":go_default_library",
visibility = ["//visibility:public"],
)

genrule(
name = "go-harness",
srcs = [":go-harness-binary"],
outs = ['go-harness'],
srcs = [":go"],
outs = ["go-harness"],
cmd = "cp $(SRCS) $@",
visibility = ["//visibility:public"],
)

go_binary(
name = "go",
embed = [":go_default_library"],
importpath = "github.com/lyft/protoc-gen-validate/tests/harness/go",
visibility = ["//visibility:public"],
)
62 changes: 62 additions & 0 deletions tests/kitchensink/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")

#gazelle:exclude go/

load(
Expand All @@ -15,3 +18,62 @@ pgv_cc_proto_library(
name = "fixed32_cc",
srcs = ["fixed32.proto"],
)

proto_library(
name = "tests_kitchensink_proto",
srcs = [
"any.proto",
"bool.proto",
"bytes.proto",
"disabled.proto",
"duration.proto",
"enum.proto",
"fixed32.proto",
"fixed64.proto",
"float.proto",
"int32.proto",
"int64.proto",
"map.proto",
"message.proto",
"oneof.proto",
"repeated.proto",
"sfixed32.proto",
"sfixed64.proto",
"sint32.proto",
"sint64.proto",
"string.proto",
"timestamp.proto",
"uint32.proto",
"uint64.proto",
"wrapper.proto",
],
visibility = ["//visibility:public"],
deps = [
"//validate:validate_proto",
"@com_google_protobuf//:any_proto",
"@com_google_protobuf//:duration_proto",
"@com_google_protobuf//:timestamp_proto",
"@com_google_protobuf//:wrappers_proto",
],
)

go_proto_library(
name = "tests_kitchensink_go_proto",
importpath = "github.com/lyft/protoc-gen-validate/tests/kitchensink",
proto = ":tests_kitchensink_proto",
visibility = ["//visibility:public"],
deps = [
"//validate:go_default_library",
"//vendor/github.com/golang/protobuf/ptypes/any:go_default_library",
"//vendor/github.com/golang/protobuf/ptypes/duration:go_default_library",
"//vendor/github.com/golang/protobuf/ptypes/timestamp:go_default_library",
"//vendor/github.com/golang/protobuf/ptypes/wrappers:go_default_library",
],
)

go_library(
name = "go_default_library",
embed = [":tests_kitchensink_go_proto"],
importpath = "github.com/lyft/protoc-gen-validate/tests/kitchensink",
visibility = ["//visibility:public"],
)
1 change: 1 addition & 0 deletions vendor/github.com/golang/protobuf/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/golang/protobuf/jsonpb/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/github.com/golang/protobuf/proto/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 39f5c47

Please sign in to comment.