Skip to content
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

refactor: use buildeventstream alias for clarity #70

Merged
merged 1 commit into from
Nov 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ load("@bazel_gazelle//:def.bzl", "gazelle")
# TODO: follow https://sagikazarmark.hu/blog/vanity-import-paths-in-go/
# so we have savvy go imports for users
# gazelle:prefix aspect.build/cli
# gazelle:resolve go aspect.build/cli/bazel/buildeventstream/proto //bazel/buildeventstream/proto
gazelle(name = "gazelle")

gazelle(
Expand Down
6 changes: 6 additions & 0 deletions bazel/buildeventstream/proto/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# gazelle:exclude dummy.go

alias(
name = "proto",
actual = "//third-party/github.com/bazelbuild/bazel/src/main/java/com/google/devtools/build/lib/buildeventstream/proto",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think it's also fine for us to vendor the file itself here, the third-party directory structure isn't mandated anywhere

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I believe there's no obligation to do the way I did. Still, I like to keep it there as it makes it clear the file is vendored and not authored by us.

visibility = ["//visibility:public"],
)
4 changes: 2 additions & 2 deletions pkg/aspect/build/bep/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ go_library(
importpath = "aspect.build/cli/pkg/aspect/build/bep",
visibility = ["//visibility:public"],
deps = [
"//bazel/buildeventstream/proto",
"//pkg/aspecterrors",
"//pkg/aspectgrpc",
"//third-party/github.com/bazelbuild/bazel/src/main/java/com/google/devtools/build/lib/buildeventstream/proto",
"@go_googleapis//google/devtools/build/v1:build_go_proto",
"@io_bazel_rules_go//proto/wkt:empty_go_proto",
"@org_golang_google_grpc//:go_default_library",
Expand All @@ -20,10 +20,10 @@ go_test(
srcs = ["bes_backend_test.go"],
embed = [":bep"],
deps = [
"//bazel/buildeventstream/proto",
"//pkg/aspecterrors",
"//pkg/aspectgrpc/mock",
"//pkg/stdlib/mock",
"//third-party/github.com/bazelbuild/bazel/src/main/java/com/google/devtools/build/lib/buildeventstream/proto",
"@com_github_golang_mock//gomock",
"@com_github_onsi_gomega//:gomega",
"@go_googleapis//google/devtools/build/v1:build_go_proto",
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugin/sdk/v1alpha1/plugin/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ go_library(
importpath = "aspect.build/cli/pkg/plugin/sdk/v1alpha1/plugin",
visibility = ["//visibility:public"],
deps = [
"//bazel/buildeventstream/proto",
"//pkg/ioutils",
"//pkg/plugin/sdk/v1alpha1/proto",
"//third-party/github.com/bazelbuild/bazel/src/main/java/com/google/devtools/build/lib/buildeventstream/proto",
"@com_github_hashicorp_go_plugin//:go-plugin",
"@com_github_manifoldco_promptui//:promptui",
"@org_golang_google_grpc//:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion plugins/fix-visibility/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ go_library(
importpath = "aspect.build/cli/plugins/fix-visibility",
visibility = ["//release:__pkg__"],
deps = [
"//bazel/buildeventstream/proto",
"//pkg/ioutils",
"//pkg/plugin/sdk/v1alpha1/config",
"//third-party/github.com/bazelbuild/bazel/src/main/java/com/google/devtools/build/lib/buildeventstream/proto",
"@bazel_gazelle//label:go_default_library",
"@com_github_bazelbuild_buildtools//edit:go_default_library",
"@com_github_hashicorp_go_plugin//:go-plugin",
Expand Down