Skip to content

Commit

Permalink
Add explicit dependency versions (#696)
Browse files Browse the repository at this point in the history
Version constraints are copied from existing Bazel rules. In the
future, these version upgrades must be performed atomically.
  • Loading branch information
johanbrandhorst authored and achew22 committed Jul 23, 2018
1 parent 5948c50 commit 905e714
Show file tree
Hide file tree
Showing 6 changed files with 204 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ bazel-genfiles
bazel-grpc-gateway
bazel-out
bazel-testlogs

# Go vendor directory
vendor
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ before_install:
- test "${USE_BAZEL}" = true || go get github.com/golang/lint/golint
- test "${USE_BAZEL}" = true || go get github.com/dghubble/sling
- test "${USE_BAZEL}" = true || go get github.com/go-resty/resty
- test "${USE_BAZEL}" = true || curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
install:
# Make sure externally referenced packages are go-gettable.
- test "${USE_BAZEL}" = true ||
Expand Down
129 changes: 129 additions & 0 deletions Gopkg.lock

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

67 changes: 67 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
required = [
"github.com/golang/protobuf/protoc-gen-go",
]

[prune]
go-tests = true
unused-packages = true

# Constrained versions that are defined in WORKSPACE are at the top

[[constraint]]
# Also defined in WORKSPACE
revision = "0ca9ea5df5451ffdf184b4428c902747c2c11cd7"
name = "github.com/ghodss/yaml"

[[constraint]]
# Also defined in WORKSPACE
revision = "f8815663de1e64d57cdd4ee9e2b2fa96977a030e"
name = "github.com/go-resty/resty"

[[constraint]]
# Also defined in WORKSPACE
revision = "6724a57986aff9bff1a1770e9347036def7c89f6"
name = "github.com/rogpeppe/fastuuid"

[[override]]
# Also defined in WORKSPACE
revision = "eb3733d160e74a9c7e442f435eb3bea458e1d19f"
name = "gopkg.in/yaml.v2"

# These versions are constrained transitively by bazelbuild/rules_go

[[constraint]]
# Also defined in bazelbuild/rules_go
# https://github.com/bazelbuild/rules_go/blob/436452edc29a2f1e0edc22d180fbb57c27e6d0af/go/private/repositories.bzl#L75
revision = "b4deda0973fb4c70b50d226b1af49f3da59f5265"
name = "github.com/golang/protobuf"

[[constraint]]
# Also defined in bazelbuild/rules_go
# https://github.com/bazelbuild/rules_go/blob/436452edc29a2f1e0edc22d180fbb57c27e6d0af/go/private/repositories.bzl#L110
revision = "640f4622ab692b87c2f3a94265e6f579fe38263d"
name = "golang.org/x/net"

[[constraint]]
# Also defined in bazelbuild/rules_go
# https://github.com/bazelbuild/rules_go/blob/436452edc29a2f1e0edc22d180fbb57c27e6d0af/go/private/repositories.bzl#L123
revision = "d11072e7ca9811b1100b80ca0269ac831f06d024"
name = "google.golang.org/grpc"

[[constraint]]
# Also defined in bazelbuild/rules_go
# https://github.com/bazelbuild/rules_go/blob/436452edc29a2f1e0edc22d180fbb57c27e6d0af/go/private/repositories.bzl#L131
revision = "86e600f69ee4704c6efbf6a2a40a5c10700e76c2"
name = "google.golang.org/genproto"

[[constraint]]
# Also defined in bazelbuild/rules_go
# https://github.com/bazelbuild/rules_go/blob/436452edc29a2f1e0edc22d180fbb57c27e6d0af/go/private/repositories.bzl#L138
revision = "23def4e6c14b4da8ac2ed8007337bc5eb5007998"
name = "github.com/golang/glog"

[[override]]
# Also defined in bazelbuild/rules_go
# https://github.com/bazelbuild/rules_go/blob/436452edc29a2f1e0edc22d180fbb57c27e6d0af/go/private/repositories.bzl#L117
revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0"
name = "golang.org/x/text"
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ generate: $(RUNTIME_GO)
.SUFFIXES: .go .proto

$(GO_PLUGIN):
go get $(GO_PLUGIN_PKG)
dep ensure -vendor-only
go install ./vendor/$(GO_PLUGIN_PKG)
go build -o $@ $(GO_PLUGIN_PKG)

$(RUNTIME_GO): $(RUNTIME_PROTO) $(GO_PLUGIN)
Expand Down
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ workspace(name = "grpc_ecosystem_grpc_gateway")

http_archive(
name = "io_bazel_rules_go",
url = "https://github.com/bazelbuild/rules_go/releases/download/0.10.3/rules_go-0.10.3.tar.gz",
sha256 = "feba3278c13cde8d67e341a837f69a029f698d7a27ddbb2a202be7a10b22142a",
url = "https://github.com/bazelbuild/rules_go/releases/download/0.12.1/rules_go-0.12.1.tar.gz",
sha256 = "8b68d0630d63d95dacc0016c3bb4b76154fe34fca93efd65d1c366de3fcb4294",
)

http_archive(
Expand Down

0 comments on commit 905e714

Please sign in to comment.