x/tools/cmd/goimports: do not prefix packages from GOROOT if it is inside a module #31206
Labels
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?What did you do?
I have a
GOROOT
inside a module (a per-repository Go installation for a hermetic build).I run
goimports
, it tries to resolve a package (say,reflect
), it loads packages fromGOROOT
, and they end up being prefixed with a path inside the current module.What did you expect to see?
What did you see instead?
How to fix
[Patch redacted by @bcmills. Please send a PR or CL so that we can verify CLA compliance.]
The text was updated successfully, but these errors were encountered: