Skip to content

Instantly share code, notes, and snippets.

@endobson
Last active September 8, 2018 06:48
Show Gist options
  • Save endobson/0e1dfabf369de55d5caacb9c71df59c3 to your computer and use it in GitHub Desktop.
Save endobson/0e1dfabf369de55d5caacb9c71df59c3 to your computer and use it in GitHub Desktop.
load(":my_rule.bzl", "my_rule")
my_rule(
name = "foo",
deps = [":bar"],
)
my_rule(
name = "bar",
)
my_provider = provider(fields=["files"])
def _my_rule_impl(ctx):
return []
def _my_aspect_impl(target, ctx):
return my_provider(files=[])
my_aspect = aspect(
implementation = _my_aspect_impl
)
my_rule = rule(
implementation = _my_rule_impl,
attrs = {
"deps": attr.label_list(aspects=[my_aspect])
},
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment