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: file positions reported by 'go test' differ for compile errors and vet errors #24344
Comments
Also, the |
Finally, if there are line directives, the result changes again. For:
(with EOF after |
The file name is coming from cmd/go, not cmd/compile. I think we need a clearer example of where an inconsistency happens. I don't think it is a problem if go/parser and cmd/go wind up with different file names, since they are being invoked differently. |
@ianlancetaylor note that my point is about the inconsistency between go/parser based tools and the main cmd/... tools. For example, now that |
@mvdan I think what @ianlancetaylor is alluding to is that we need a clearer example of why it matters. The fact that one tool reports |
Ah, I see. It hasn't caused me any trouble other than me noticing and being slightly bothered by it :) |
I actually do like the example of |
I think we need to start with just output
end goal should be this in all cases, to make vet consistent with itself and other tools :)
|
Given a single file with a trivial syntax error in the current directory:
The compiler likes to use the
./
prefix, while the older packages likego/parser
don't. Is there a good reason for this inconsistency? If not, I imagine that they should be consistent.Labelling as NeedsDecision as it's not immediately clear to me if there should be a fix, and what that fix would look like.
/cc @griesemer @mdempsky
The text was updated successfully, but these errors were encountered: