Description
In #51448 (comment), Bryan wrote:
The argument
.
should triggermodfile.IsDirectoryPath
here:
https://cs.opensource.google/go/go/+/ce427cf96128b545ae473983bafb6a0b80ecaa08:src/cmd/go/internal/modload/modfile.go;l=805-807But it doesn't: this looks like a bug in
IsDirectoryPath
, which does not expect to ever need to refer to a module in the same directory (compare #34417).For Go 1.19, we should probably fix up
modfile.IsDirectoryPath
. For 1.18, perhaps we should change the condition toif path == "." || modfile.IsDirectoryPath(path)
.
The Go 1.18 condition change happened in CL 389298. This is the tracking issue for the bug in modfile.IsDirectoryPath
that we can still fix in Go 1.22 or later. (Or even in Go 1.21 if this bug fix is considered okay in the current pre-RC1 phase of the release freeze.)
I'll send a CL.