Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/cover: inconsistent NumStmt when //line clauses are used [1.11 backport] #27397

gopherbot opened this issue Aug 30, 2018 · 4 comments


Copy link

@gopherbot gopherbot commented Aug 30, 2018

@FiloSottile requested issue #27350 to be considered for backport to the next 1.11 minor release.

@gopherbot please file this to be considered for backport to 1.11. This is a regression.

Copy link

@bradfitz bradfitz commented Nov 1, 2018

No fix yet, so bumping to Go 1.11.3.

But I question whether this is important enough, especially at this point, to warrant any backport.

/cc @katiehockman @andybons @FiloSottile @dmitshur @ianlancetaylor

Copy link

@katiehockman katiehockman commented Nov 1, 2018

I don't think it would warrant a backport since we adjusted our backport policy to be stricter. It doesn't seem like a major issue, and there is a noted workaround - removing the //line comments generated by Ragel.

Copy link

@syllant syllant commented Nov 2, 2018

Hey, I encounter a problem that could share the same cause, seems to me the coverprofile generation is broken with Go 1.11 when there are line directives. The column numbers are set to 0 in the output file, which can lead to issues when parsing this file. The workaround can't work for us since we do want to run tests against these instrumented files. Let me know if I should open another issue, I don't want to hijack this one.

Copy link

@ianlancetaylor ianlancetaylor commented Dec 7, 2018

I'm closing this backport since this I think doesn't meet the backport criteria. A simpler workaround is to run the file through gofmt. Please comment if you disagree.

@dmitshur dmitshur modified the milestones: Go1.11.3, Go1.11.4 Dec 13, 2018
@golang golang locked and limited conversation to collaborators Dec 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.