Skip to content

Commit

Permalink
Update dependencies (grpc-ecosystem#1053)
Browse files Browse the repository at this point in the history
* makefile now actually tests correctly

- sed was removed as it was slow and not
the canonical way to implement a replace of a go
package now that modules have been introduced
- go test commands were correct as the elipsis
was not testing the right thing
- test.Short was added to the rest of the integration
tests just in case users wanted to use the -short
directive and skip those (matching the style
throughout the rest of the integrations

* fixing the bazel bits

* re-run generation with newer circle dockerfile

* updates contributing to note usage of go.mod

- gazelle has a slightly different command you need to
use based on us using the go.mod to manage our
dependencies

* move backwards to resty 1.8.0

- stops all the go.mod craziness since they've switched
between gopkg.in and github as their module name.
- need to upgrade this to v2 in reality but
that will depend on what swagger codegen
is doing
  • Loading branch information
zachgersh authored and johanbrandhorst committed Oct 2, 2019
1 parent 78dc1a3 commit 5d50197
Show file tree
Hide file tree
Showing 28 changed files with 1,208 additions and 1,100 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ docker run -v $(pwd):/src/grpc-gateway --rm jfbrandhorst/grpc-gateway-build-env:
make realclean && \
make examples SWAGGER_CODEGEN="${SWAGGER_CODEGEN}"'
docker run -itv $(pwd):/grpc-gateway -w /grpc-gateway --entrypoint /bin/bash --rm \
l.gcr.io/google/bazel -c 'bazel run :gazelle; bazel run :buildifier'
l.gcr.io/google/bazel -c 'bazel run :gazelle -- update-repos -from_file=go.mod -to_macro=repositories.bzl%go_repositories; bazel run :buildifier'
```

If this has resulted in some file changes in the repo, please ensure you check those in with your merge request.
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,9 @@ $(RESPONSE_BODY_EXAMPLE_SRCS): $(RESPONSE_BODY_EXAMPLE_SPEC)
$(EXAMPLE_CLIENT_DIR)/responsebody/git_push.sh

examples: $(EXAMPLE_DEPSRCS) $(EXAMPLE_SVCSRCS) $(EXAMPLE_GWSRCS) $(EXAMPLE_SWAGGERSRCS) $(EXAMPLE_CLIENT_SRCS)
find . -type f -name *.go -exec sed -s -i 's;github.com/go-resty/resty;gopkg.in/resty.v1;g' {} +
test: examples
go test -race ...
go test -race examples/integration -args -network=unix -endpoint=test.sock
go test -short -race ./...
go test -race ./examples/integration -args -network=unix -endpoint=test.sock
changelog:
docker run --rm \
--interactive \
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ go_register_toolchains()

http_archive(
name = "bazel_gazelle",
sha256 = "be9296bfd64882e3c08e3283c58fcb461fa6dd3c171764fcc4cf322f60615a9b",
sha256 = "7fc87f4170011201b1690326e8c16c5d802836e3a0d617d8f75c3af2b23180c4",
urls = [
"https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/bazel-gazelle/releases/download/0.18.1/bazel-gazelle-0.18.1.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/0.18.1/bazel-gazelle-0.18.1.tar.gz",
"https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/bazel-gazelle/releases/download/0.18.2/bazel-gazelle-0.18.2.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/0.18.2/bazel-gazelle-0.18.2.tar.gz",
],
)

Expand Down
2 changes: 1 addition & 1 deletion examples/clients/abe/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ go_library(
"//examples/proto/examplepb:go_default_library",
"//examples/proto/pathenum:go_default_library",
"//runtime:go_default_library",
"@in_gopkg_resty_v1//:go_default_library",
"@com_github_go_resty_resty//:go_default_library",
],
)
2 changes: 1 addition & 1 deletion examples/clients/abe/api_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"strings"
"net/url"
"io/ioutil"
"gopkg.in/resty.v1"
"github.com/go-resty/resty"
)

type APIClient struct {
Expand Down
2 changes: 1 addition & 1 deletion examples/clients/echo/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ go_library(
"examplepb_simple_message.go",
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/clients/echo",
deps = ["@in_gopkg_resty_v1//:go_default_library"],
deps = ["@com_github_go_resty_resty//:go_default_library"],
)
2 changes: 1 addition & 1 deletion examples/clients/echo/api_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"strings"
"net/url"
"io/ioutil"
"gopkg.in/resty.v1"
"github.com/go-resty/resty"
)

type APIClient struct {
Expand Down
2 changes: 1 addition & 1 deletion examples/clients/responsebody/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ go_library(
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/clients/responsebody",
visibility = ["//visibility:public"],
deps = ["@in_gopkg_resty_v1//:go_default_library"],
deps = ["@com_github_go_resty_resty//:go_default_library"],
)
2 changes: 1 addition & 1 deletion examples/clients/responsebody/api_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"strings"
"net/url"
"io/ioutil"
"gopkg.in/resty.v1"
"github.com/go-resty/resty"
)

type APIClient struct {
Expand Down
2 changes: 1 addition & 1 deletion examples/clients/unannotatedecho/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ go_library(
"unannotated_echo_service_api.go",
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/clients/unannotatedecho",
deps = ["@in_gopkg_resty_v1//:go_default_library"],
deps = ["@com_github_go_resty_resty//:go_default_library"],
)
2 changes: 1 addition & 1 deletion examples/clients/unannotatedecho/api_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"strings"
"net/url"
"io/ioutil"
"gopkg.in/resty.v1"
"github.com/go-resty/resty"
)

type APIClient struct {
Expand Down
Loading

0 comments on commit 5d50197

Please sign in to comment.