cmd/go: 'go mod tidy' removes needed requirements when the module directory ends in '/testdata' #28481
Labels
FrozenDueToAge
GoCommand
cmd/go
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
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?
Try to use a testdata Go module. This is useful so that one can have Go packages that can import each other, to be used as input for a tool's tests. Below is a simple reproduction script.
What did you expect to see?
The
go mod tidy
at the end being a no-op.What did you see instead?
The
go mod tidy
removing the dependency thatgo build
added.Thanks to @myitcv for helping debug what was going on.
The text was updated successfully, but these errors were encountered: