From 239d7c6fdf344fe7051328056b7578657c7b6950 Mon Sep 17 00:00:00 2001 From: Matthias Bertschy Date: Thu, 4 Jul 2019 08:33:00 +0200 Subject: go_generics: treat the Sel part of an ast.SelectorExpr --- tools/go_generics/defs.bzl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/go_generics/defs.bzl') diff --git a/tools/go_generics/defs.bzl b/tools/go_generics/defs.bzl index 999fb3426..596bf51be 100644 --- a/tools/go_generics/defs.bzl +++ b/tools/go_generics/defs.bzl @@ -93,6 +93,9 @@ def _go_template_instance_impl(ctx): args += [("-c=%s=%s" % (p[0], p[1])) for p in ctx.attr.consts.items()] args += [("-import=%s=%s" % (p[0], p[1])) for p in ctx.attr.imports.items()] + if ctx.attr.anon: + args += ["-anon"] + ctx.actions.run( inputs = [template.file], outputs = [output], @@ -129,6 +132,7 @@ go_template_instance = rule( "types": attr.string_dict(), "consts": attr.string_dict(), "imports": attr.string_dict(), + "anon": attr.bool(mandatory=False, default=False), "package": attr.string(mandatory = True), "out": attr.output(mandatory = True), "_tool": attr.label(executable = True, cfg = "host", default = Label("//tools/go_generics")), -- cgit v1.2.3