go/packages: line directives not treatead properly in the exported file #71080
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Reproducer (using the
x/tools/go/packages
testing API):The
Mode
is set topackages.LoadSyntax
, thusgo/packages
is going to loadtest/other
from theExportFile
.$ go test ./go/packages/ -run TestReproducer -v === RUN TestReproducer (....) packages_test.go:3455: other.go:4:1 --- PASS: TestReproducer (0.15s)
The file name (
other.go
) comes from the line directive, but the line/col (4:1
) information does not.I think that the issue is somewhere in
cmd/go
, while debugging, i saw the same values here (i.e. other.go:4:1):https://github.com/golang/tools/blob/4f820dbaf9859eaafa01a17d133583f4d8c5a73c/internal/gcimporter/ureader_yes.go#L201-L205
The text was updated successfully, but these errors were encountered: