-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update repo using latest gazelle. (#281)
* upgrade rule_go; run gazelle everywhere * add go_proto_checkedin_test to deal with latest go_proto_library and run update_generated.sh to regenerate files * format build_defs.bzl with buildifier -type bzl * add buildifier_integration_test to tests suite * revert x_defs for linkstamp until it works -- in a follow up PR.
- Loading branch information
Showing
31 changed files
with
457 additions
and
546 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,29 @@ | ||
load("@io_bazel_rules_go//proto:go_proto_library.bzl", "go_proto_library") | ||
load("//build:build_defs.bzl", "genfile_check_test") | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") | ||
load("//build:build_defs.bzl", "go_proto_checkedin_test") | ||
|
||
genfile_check_test( | ||
# gazelle:exclude api.gen.pb.go | ||
|
||
go_proto_checkedin_test( | ||
src = "api.gen.pb.go", | ||
gen = "api.pb.go", | ||
) | ||
|
||
proto_library( | ||
name = "api_proto_proto", | ||
srcs = ["api.proto"], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
go_proto_library( | ||
name = "api_proto_go_proto", | ||
importpath = "github.com/bazelbuild/buildtools/api_proto", | ||
proto = ":api_proto_proto", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
go_library( | ||
name = "go_default_library", | ||
srcs = ["api.proto"], | ||
embed = [":api_proto_go_proto"], | ||
importpath = "github.com/bazelbuild/buildtools/api_proto", | ||
visibility = ["//visibility:public"], | ||
) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,29 @@ | ||
load("@io_bazel_rules_go//proto:go_proto_library.bzl", "go_proto_library") | ||
load("//build:build_defs.bzl", "genfile_check_test") | ||
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") | ||
load("//build:build_defs.bzl", "go_proto_checkedin_test") | ||
|
||
genfile_check_test( | ||
# gazelle:exclude build.gen.pb.go | ||
|
||
go_proto_checkedin_test( | ||
src = "build.gen.pb.go", | ||
gen = "build.pb.go", | ||
) | ||
|
||
genrule( | ||
name = "copy_and_fix", | ||
srcs = ["@io_bazel//src/main/protobuf:srcs"], | ||
outs = ["build.proto"], | ||
cmd = ("SRCS=($(locations @io_bazel//src/main/protobuf:srcs));" + | ||
"cp $$(dirname $$SRCS)/build.proto $@"), | ||
cmd = "SRCS=($(locations @io_bazel//src/main/protobuf:srcs));" + | ||
"cp $$(dirname $$SRCS)/build.proto $@", | ||
) | ||
|
||
proto_library( | ||
name = "blaze_query_proto", | ||
srcs = ["build.proto"], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
go_proto_library( | ||
name = "go_default_library", | ||
srcs = ["build.proto"], | ||
importpath = "github.com/bazelbuild/buildtools/build_proto", | ||
proto = ":blaze_query_proto", | ||
visibility = ["//visibility:public"], | ||
) |
Oops, something went wrong.