x/tools/go/packages: NeedExportFile causes error about invalid go.mod file to be dropped #67638
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Go version
go version devel go1.23-722d59436b Thu May 16 02:00:26 2024 +0000 linux/amd64
Output of
go env
in your module/workspace:What did you do?
In the following archive,
main.go
usesgo/packages
to load./...
inside thebar
directory.bar
is its own Go module with an invalidgo.mod
file.What did you see happen?
packages.Load returns no packages and no error.
What did you expect to see?
An error to be returned.
When removing NeedExportFile from the mode, we correctly get the following error:
The text was updated successfully, but these errors were encountered: