Closed as not planned
Closed as not planned
Description
Some existing tests of Go tools make use of testdata
directories containing a self-contained GOPATH
.¹
For those tests to work as expected in module mode, the testdata
directories may need to contain go.mod
files, but in order for the tests to pass when run from within other modules, those go.mod
files should be included in the same module as the test — they should not actually define separate modules.
(There's just one caveat that I know of: at the moment, adding a go.mod
file is the easiest way to prune out files whose paths are invalid in the module zip format (see #26672).)
¹ e.g., x/tools/cmd/fiximports/testdata