-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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/go: test -coverprofile should ask compiler to drop (incorrect) position information #67938
Comments
Similar Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
It occurs to me that cmd/compile may now support /*line x.go:1:2*/ comments (it did not originally), and so a different fix would be to keep the CL 446259 change and arrange to emit a /*line*/ comment after each text insertion to correct the column information. |
Ouch, here is a worse error:
Maybe go test -cover should compile the packages normally first and only ever invoke cmd/cover on well-formed programs? Either that or cover needs to emit errors in the standard compiler form ( |
I am running into these because I am running |
There is no column 35 on the line
b := f(2)
, making the error message very confusing. The problem is that cover has inserted text into the lines. When the compiler did not print column information, that was invisible. Now it's not.To make it invisible again, the compiler should add a flag to drop position information, and then the go command should use that flag when compiling with test coverage.
The text was updated successfully, but these errors were encountered: