Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
cmd/cover: doesn't work with tip when using //go: annotations #18285
With devel +0716fef:
Okay, root cause is that the compiler directives in
$ go tool cover -mode=count runtime/os3_solaris.go # .. notice that the compiler directives are present ... $ ../pkg/tool/linux_amd64/cover -mode=count runtime/os3_solaris.go # ... notice absence of compiler directives ...
This is happening because of my own change: golang.org/cl/30161. Coverage instrumentation removes all comments that are not present as nodes in the AST; because they were interfering with inserted code.
Parser doesn't keep these compiler directives as nodes in AST, but instead as
Working on the fix.
PS: The issue will go away with dhananjay92@4a16ac8 because doing that makes parser keep those comments in AST. Parser only keeps comments into the tree that can potentially be document-comments
Thanks for the investigation. As you mentioned above, a few packages that import runtime symbols by using