Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: ignore 'go.mod' files in 'testdata' subdirectories when computing module boundaries #27852
Some existing tests of Go tools make use of
For those tests to work as expected in module mode, the
(There's just one caveat that I know of: at the moment, adding a
This bit I don't quite understand, specifically "should be included in the same module as the test". Could you clarify?
That said, with tests that do require a "full setup" (i.e. a go.mod etc) is it not just as easy to create a temporary directory and programmatically create a go.mod within it? Seems a bit easier/cleaner than offering an exemption to the rule?
Or just use
If I add a
That is a straightforward workaround, but it splits the test input across two places (the