cmd/go: strange attribution of missing imports #65335
Labels
GoCommand
cmd/go
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Go version
go version go1.21.6 linux/amd64
Output of
go env
in your module/workspace:What did you do?
What did you see happen?
Here's the full output:
And just the bits I found surprising:
Notably:
What did you expect to see?
I expected
go list
to report errors on packages a and b attributed to the bad import statements. That is, one error on package a at a/a.go:3 and another on package b at b/b.go:3. Something like:I'm not sure whether I expected it to report a package for "x" at all. If it did, that would presumably also need an error. The "x" package it currently reports is pretty weird because it's missing so many fields (like Dir). If it didn't report a package "x", it would probably have to omit "x" from the
Imports
andDeps
lists, which I think would be fine.The text was updated successfully, but these errors were encountered: