Closed jkomoros closed 3 years ago
No obvious culprits in the release notes for the last few go versions
genDecl.Doc.List shows the magic comment, but genDecl.Doc.Text does not...
Ah, the behavior of that method seems to have changed, perhaps with go:embed behavior being added?
"Text returns the text of the comment. Comment markers (//, /, and /), the first space of a line comment, and leading and trailing empty lines are removed. Comment directives like "//line" and "//go:noinline" are also removed. Multiple empty lines are reduced to one, and trailing space on lines is trimmed. Unless the result is empty, it is newline-terminated."
yeah, isDirective within the standard lib strips out the boardgame:codegen
comment: https://golang.org/src/go/ast/ast.go?s=2508:2570#L66
findEnums doesn't find the enums, because the magic text isn't visible in the genDecl.Doc.Text() for some reason. Did the behavior of doclines for paranthesized const declarations change in recent versions of Go?