-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update rules_go and gazelle #802
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,16 +2,24 @@ workspace(name = "grpc_ecosystem_grpc_gateway") | |
|
||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
|
||
# master as of 2018-11-09. This should be updated when a new release is tagged. | ||
johanbrandhorst marked this conversation as resolved.
Show resolved
Hide resolved
|
||
http_archive( | ||
name = "io_bazel_rules_go", | ||
sha256 = "8b68d0630d63d95dacc0016c3bb4b76154fe34fca93efd65d1c366de3fcb4294", | ||
url = "https://github.com/bazelbuild/rules_go/releases/download/0.12.1/rules_go-0.12.1.tar.gz", | ||
sha256 = "c23db3b50b8822e153bc5accfea75baeecedb481a162391c4f3b9aec451e34b4", | ||
strip_prefix = "rules_go-109c520465fcb418f2c4be967f3744d959ad66d3", | ||
urls = [ | ||
"https://github.com/bazelbuild/rules_go/archive/109c520465fcb418f2c4be967f3744d959ad66d3.tar.gz", | ||
], | ||
) | ||
|
||
# master as of 2018-11-09. This should be updated when a new release is tagged. | ||
http_archive( | ||
name = "bazel_gazelle", | ||
sha256 = "d03625db67e9fb0905bbd206fa97e32ae9da894fe234a493e7517fd25faec914", | ||
url = "https://github.com/bazelbuild/bazel-gazelle/releases/download/0.10.1/bazel-gazelle-0.10.1.tar.gz", | ||
sha256 = "a3af4a61d7b2f2c5386761f94a21f474871a32f0e94b13f08824248c4df25229", | ||
strip_prefix = "bazel-gazelle-7b1e3c6eb5447c6647955fc93c012635f274f0f0", | ||
urls = [ | ||
"https://github.com/bazelbuild/bazel-gazelle/archive/7b1e3c6eb5447c6647955fc93c012635f274f0f0.tar.gz", | ||
], | ||
) | ||
|
||
http_archive( | ||
|
@@ -21,12 +29,10 @@ http_archive( | |
url = "https://github.com/bazelbuild/buildtools/archive/e90e7cc6ef3e6d08d4ca8a982935c3eed638e058.tar.gz", | ||
) | ||
|
||
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") | ||
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository") | ||
|
||
gazelle_dependencies() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nob objecting, just trying to learn: Maybe I'm not tracking developments in Bazel world closely enough, but if gazelle_dependencies() is no longer imported, where is this defined? Why does this work? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. gazelle_dependencies is still loaded from bazel_gazelle//:deps.bzl, along with go_repository. The only change here is that two load() statements have been consolidated into one. |
||
|
||
load("@bazel_gazelle//:def.bzl", "go_repository") | ||
load("//:repositories.bzl", "repositories") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not objecting, just trying to learn: Why remove repositories.bzl? Wouldn't it be better to allow third parties to import a repositories.bzl and transitively depend? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The repository defined by repositories.bzl is obsolete, having been replaced by @go_googleapis (created by go_rules_dependencies()). Since repositories.bzl is unable to call go_rules_dependencies() (bazelbuild/bazel#1550) there's nothing left for it to do. |
||
load("@io_bazel_rules_go//go:def.bzl", "go_register_toolchains", "go_rules_dependencies") | ||
|
||
# Also define in Gopkg.toml | ||
|
@@ -64,8 +70,6 @@ go_repository( | |
importpath = "gopkg.in/yaml.v2", | ||
) | ||
|
||
repositories() | ||
|
||
go_rules_dependencies() | ||
|
||
go_register_toolchains() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
|
||
go_library( | ||
name = "go_default_library", | ||
srcs = [ | ||
"api_client.go", | ||
"api_response.go", | ||
"configuration.go", | ||
"examplepb_response_body_message.go", | ||
"examplepb_response_body_message_response.go", | ||
"examplepb_response_body_out.go", | ||
"examplepb_response_body_out_response.go", | ||
"examplepb_response_body_req.go", | ||
"response_body_service_api.go", | ||
], | ||
importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/clients/responsebody", | ||
visibility = ["//visibility:public"], | ||
deps = ["@com_github_go_resty_resty//:go_default_library"], | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
master: Could not introduce github.com/grpc-ecosystem/grpc-gateway@master, as it has a dependency on github.com/golang/protobuf with constraint aa810b61a9c79d51363740d207bb46cf8e620ed5, which has no overlap with existing constraint master from github.com/grpc-ecosystem/go-grpc-middleware@master
@achew22 @drigz
broken!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a
go dep
but I don't think this change introduced the problem, as even before the version was constrained and would have conflicted withgo-grpc-middleware
's constraint. @javasgl Maybe you need to use an override to resolve the difference?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I've explained the situation in #829