Closed
Description
@bcmills requested issue #44776 to be considered for backport to the next 1.16 minor release.
@gopherbot, please backport to Go 1.16.
Go 1.16 added previously-missing path validation paths and enabled module mode by default, both of which made this check much more likely to be triggered.
I don't think this needs to be backported to Go 1.15. In 1.15, the
go
command had a bug that caused these paths not to be diagnosed if they are already present in some module in the build list. That bug was incidentally fixed in CL 258298 for Go 1.16. (This issue was exposed by the combination of fixing that bug and enabling module mode by default in Go 1.16.)