Skip to content

Commit

Permalink
Don't return structs from rule implementations
Browse files Browse the repository at this point in the history
bazelbuild/bazel#7347

The `return struct(...)` form will be removed in a future Bazel version.
This doesn't completely fix the build, since (at least) rules_go
upstream has not been migrated yet.

Change-Id: I527772227c76f74d8b8abb48fbcc76f7890e7d25
  • Loading branch information
drigz committed Mar 27, 2019
1 parent d43656a commit b416665
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bazel/build_rules/app_chart/cache_gcr_credentials.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def _impl(ctx):
is_executable = True,
)

return struct(runfiles = ctx.runfiles(files = runfiles))
return [DefaultInfo(runfiles = ctx.runfiles(files = runfiles))]

cache_gcr_credentials = rule(
attrs = {
Expand Down
2 changes: 1 addition & 1 deletion bazel/build_rules/app_chart/run_parallel.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def _impl(ctx):
is_executable = True,
)

return struct(runfiles = ctx.runfiles(files = runfiles))
return [DefaultInfo(runfiles = ctx.runfiles(files = runfiles))]

run_parallel = rule(
attrs = {
Expand Down
2 changes: 1 addition & 1 deletion bazel/build_rules/app_chart/run_sequentially.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def _impl(ctx):
is_executable = True,
)

return struct(runfiles = ctx.runfiles(files = runfiles))
return [DefaultInfo(runfiles = ctx.runfiles(files = runfiles))]

run_sequentially = rule(
attrs = {
Expand Down

0 comments on commit b416665

Please sign in to comment.