cmd/vet: panic when run with -source starting at CL 38262 #19598
Comments
My guess is that it uncovered a misuse of Check. Thanks for filing the bug. |
Perhaps related to how you're using "." as an argument. If I understand correctly, you have to give the full import path (absolute, not relative) to go/types. Does it fail if you give it explicitly, like |
'go tool vet -source |
I traced this down a little bit. In the packages that fails ( In srcimporter.Importer.ImportFrom, that goes into the build.IsLocalImport(path), gets resolved using p.ctxt.ImportDir, and the resulting package has I'm not sure where in this chain of events something has gone wrong, but I don't think vet is doing anything wrong here. I suspect that srcimporter does not correctly handle relative imports, one way or another. |
Once this is resolved, re-submit CL 38262. |
@josharian Thanks for looking into this; and my apologies for not looking at the one failure more carefully. |
I can't reproduce this on tip |
Maybe fixed, and maybe we'll just remove -source entirely anyway. |
To reproduce, go to
$GOROOT/src
and rungo tool vet -source .
. Results:This is why the vetall builder is currently red. Haven't investigated whether the CL is the problem or whether it uncovered an existing problem.
cc @mvdan @griesemer
The text was updated successfully, but these errors were encountered: