cmd/go: tests fail without clear reason when /tmp/go.mod exists #26708
Labels
FrozenDueToAge
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Testing
An issue that has been verified to require only test changes, not just a test failure.
Milestone
Building the Go compiler at tip (+b294fe9b0a) attempted to fetch dependencies for an unrelated repo (!?) and failed. The actual cause is not particularly obvious when you have forgotten there is a bogus
go.mod
under/tmp
from days before.. 🤔Several tests create temporary build directories under
/tmp
and rungo build
, which then finds thego.mod
and attempts to fetch unrelated dependencies. Here is a small excerpt of the log/failures:Perhaps tests should disable fetching modules to avoid loading a bogus
/tmp/go.mod
?I think a fix would be useful since
/tmp
is a fairly common place to put random files (likego.mod
) and the errors can burn a bunch time trying to make sense of them. However, I'd understand if it was considered rare enough to ignore.Thoughts?
The text was updated successfully, but these errors were encountered: