Add more fixes

This commit is contained in:
Vladimir Moskva 2019-02-21 12:58:25 +01:00
parent 46b321abe5
commit eb9851616b
2 changed files with 4 additions and 5 deletions

View File

@ -21,7 +21,7 @@
# substitutions: A dictionary mapping strings to their substitutions # substitutions: A dictionary mapping strings to their substitutions
def template_rule_impl(ctx): def template_rule_impl(ctx):
ctx.template_action( ctx.actions.expand_template(
template = ctx.file.src, template = ctx.file.src,
output = ctx.outputs.out, output = ctx.outputs.out,
substitutions = ctx.attr.substitutions, substitutions = ctx.attr.substitutions,
@ -31,8 +31,7 @@ template_rule = rule(
attrs = { attrs = {
"src": attr.label( "src": attr.label(
mandatory = True, mandatory = True,
allow_files = True, allow_single_file = True,
single_file = True,
), ),
"substitutions": attr.string_dict(mandatory = True), "substitutions": attr.string_dict(mandatory = True),
"out": attr.output(mandatory = True), "out": attr.output(mandatory = True),

View File

@ -107,7 +107,7 @@ def _proto_gen_impl(ctx):
inputs += [plugin] inputs += [plugin]
if args: if args:
ctx.action( ctx.actions.run(
inputs = inputs, inputs = inputs,
outputs = ctx.outputs.outs, outputs = ctx.outputs.outs,
arguments = args + import_flags + [s.path for s in srcs], arguments = args + import_flags + [s.path for s in srcs],
@ -132,7 +132,7 @@ proto_gen = rule(
"protoc": attr.label( "protoc": attr.label(
cfg = "host", cfg = "host",
executable = True, executable = True,
single_file = True, allow_single_file = True,
mandatory = True, mandatory = True,
), ),
"plugin": attr.label( "plugin": attr.label(