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
This commit is contained in:
Rahat Mahmood
2021-03-22 12:02:03 -07:00
committed by gVisor bot
parent b428fd02e6
commit 6bd2c6ce73
+6
View File
@@ -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")