forked from bazel-contrib/rules_go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace WKT go_library rules with aliases to //proto/wkt (bazel-contr…
…ib#1498) There are a significant number of existing rules that depend on WKT go_library rules directly (for example, @com_github_golang_protobuf//ptypes/any:go_default_library). Gazelle resolves now Go imports to @io_bazel_rules_go//proto/wkt, so it's very easy to end up with conflicting dependencies. With this change, WKT go_library rules are replaced with aliases pointing to the equivalent @io_bazel_rules_go//proto/wkt rules. protoc-gen-go itself depends on descriptor and plugin, so two bootstrap go_library rules are introduced, visible only to protoc-gen-go. Related bazel-contrib/bazel-gazelle#159
- Loading branch information
Showing
16 changed files
with
49 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 2 additions & 8 deletions
10
third_party/org_golang_google_genproto/protobuf/api/BUILD.bazel.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
|
||
go_library( | ||
alias( | ||
name = "go_default_library", | ||
srcs = ["api.pb.go"], | ||
importpath = "google.golang.org/genproto/protobuf/api", | ||
actual = "@io_bazel_rules_go//proto/wkt:api_go_proto", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"@com_github_golang_protobuf//proto:go_default_library", | ||
"@io_bazel_rules_go//proto/wkt:source_context_go_proto", | ||
"@io_bazel_rules_go//proto/wkt:type_go_proto", | ||
], | ||
) |
6 changes: 2 additions & 4 deletions
6
third_party/org_golang_google_genproto/protobuf/field_mask/BUILD.bazel.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
|
||
go_library( | ||
alias( | ||
name = "go_default_library", | ||
srcs = ["field_mask.pb.go"], | ||
importpath = "google.golang.org/genproto/protobuf/field_mask", | ||
actual = "@io_bazel_rules_go//proto/wkt:field_mask_go_proto", | ||
visibility = ["//visibility:public"], | ||
deps = ["@com_github_golang_protobuf//proto:go_default_library"], | ||
) |
10 changes: 2 additions & 8 deletions
10
third_party/org_golang_google_genproto/protobuf/ptype/BUILD.bazel.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
|
||
go_library( | ||
alias( | ||
name = "go_default_library", | ||
srcs = ["type.pb.go"], | ||
importpath = "google.golang.org/genproto/protobuf/ptype", | ||
actual = "@io_bazel_rules_go//proto/wkt:type_go_proto", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"@com_github_golang_protobuf//proto:go_default_library", | ||
"@io_bazel_rules_go//proto/wkt:any_go_proto", | ||
"@io_bazel_rules_go//proto/wkt:source_context_go_proto", | ||
], | ||
) |
6 changes: 2 additions & 4 deletions
6
third_party/org_golang_google_genproto/protobuf/source_context/BUILD.bazel.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
|
||
go_library( | ||
alias( | ||
name = "go_default_library", | ||
srcs = ["source_context.pb.go"], | ||
importpath = "google.golang.org/genproto/protobuf/source_context", | ||
actual = "@io_bazel_rules_go//proto/wkt:source_context_go_proto", | ||
visibility = ["//visibility:public"], | ||
deps = ["@com_github_golang_protobuf//proto:go_default_library"], | ||
) |