From 6bd2c6ce7307a6422e9aad26b8b3dec006f75e2d Mon Sep 17 00:00:00 2001 From: Rahat Mahmood Date: Mon, 22 Mar 2021 12:00:05 -0700 Subject: Emit comment about build tags in gomarshal generated files. This may be useful for tracking down where build tags come from and understanding tag import issues in generated files. PiperOrigin-RevId: 364374931 --- tools/go_marshal/gomarshal/generator.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/go_marshal/gomarshal/generator.go b/tools/go_marshal/gomarshal/generator.go index 634abd1af..f3b0931b8 100644 --- a/tools/go_marshal/gomarshal/generator.go +++ b/tools/go_marshal/gomarshal/generator.go @@ -126,6 +126,12 @@ func (g *Generator) writeHeader() error { b.emit("// Automatically generated marshal implementation. See tools/go_marshal.\n\n") // Emit build tags. + b.emit("// If there are issues with build tag aggregation, see\n") + b.emit("// tools/go_marshal/gomarshal/generator.go:writeHeader(). The build tags here\n") + b.emit("// come from the input set of files used to generate this file. This input set\n") + b.emit("// is filtered based on pre-defined file suffixes related to build tags, see \n") + b.emit("// tools/defs.bzl:calculate_sets().\n\n") + if t := tags.Aggregate(g.inputs); len(t) > 0 { b.emit(strings.Join(t.Lines(), "\n")) b.emit("\n\n") -- cgit v1.2.3