summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRahat Mahmood <rahat@google.com>2021-03-22 12:00:05 -0700
committergVisor bot <gvisor-bot@google.com>2021-03-22 12:02:03 -0700
commit6bd2c6ce7307a6422e9aad26b8b3dec006f75e2d (patch)
treeb70fc8e45dda356c5f053871828e5cf7812f184d
parentb428fd02e627fc151527f0f26cbff9b05f6240e0 (diff)
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
-rw-r--r--tools/go_marshal/gomarshal/generator.go6
1 files changed, 6 insertions, 0 deletions
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")