Skip to content

Instantly share code, notes, and snippets.

@ttsugriy
Created December 3, 2018 22:37
Show Gist options
  • Save ttsugriy/0d06af12e63ce75bbc48f759a8c9c00c to your computer and use it in GitHub Desktop.
Save ttsugriy/0d06af12e63ce75bbc48f759a8c9c00c to your computer and use it in GitHub Desktop.
diff --git a/rules/attributes/printer.bzl b/rules/attributes/printer.bzl
index 1a7abf1..facd739 100644
--- a/rules/attributes/printer.bzl
+++ b/rules/attributes/printer.bzl
@@ -18,8 +18,8 @@ def _impl(ctx):
printer = rule(
implementation = _impl,
attrs = {
+ "deps": attr.label_list(allow_files = True),
# Do not declare "name": It is added automatically.
"number": attr.int(default = 1),
- "deps": attr.label_list(allow_files = True),
},
)
diff --git a/rules/depsets/foo.bzl b/rules/depsets/foo.bzl
index 5923a64..01bede4 100644
--- a/rules/depsets/foo.bzl
+++ b/rules/depsets/foo.bzl
@@ -24,8 +24,8 @@ def _foo_library_impl(ctx):
foo_library = rule(
implementation = _foo_library_impl,
attrs = {
- "srcs": attr.label_list(allow_files = True),
"deps": attr.label_list(),
+ "srcs": attr.label_list(allow_files = True),
},
)
@@ -45,14 +45,14 @@ def _foo_binary_impl(ctx):
foo_binary = rule(
implementation = _foo_binary_impl,
attrs = {
- "srcs": attr.label_list(allow_files = True),
- "deps": attr.label_list(),
"_foocc": attr.label(
default = Label("//depsets:foocc"),
allow_files = True,
executable = True,
cfg = "host",
),
+ "deps": attr.label_list(),
+ "srcs": attr.label_list(allow_files = True),
},
outputs = {"out": "%{name}.out"},
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment