Michael noticed some minor issues in backports of CL 496635.
Those issues have been addressed in the backport CLs; this change
applies them to the main branch as well.
Updates #60313.
Change-Id: If68696711a10a9270193df66ed551395c14cae00
Reviewed-on: https://go-review.googlesource.com/c/go/+/502695
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
var disambiguateRoot sync.Map
for _, pkg := range pkgs {
if pkg.mod.Path == "" || pathIsRoot[pkg.mod.Path] {
- // Lazy module loading will cause m to be checked before any other modules
+ // Lazy module loading will cause pkg.mod to be checked before any other modules
// that are only indirectly required. It is as unambiguous as possible.
continue
}
replace (
example.net/a v0.1.0 => ./a
example.net/b v0.1.0 => ./b
- example.net/outer v0.1.0 => ./outer1
+ example.net/outer v0.1.0 => ./outer
example.net/outer/inner v0.1.0 => ./inner
)
-- example.go --
go 1.21
-- inner/inner.go --
package inner
--- outer1/go.mod --
+-- outer/go.mod --
module example.net/outer
go 1.21
--- outer1/inner/inner.go --
+-- outer/inner/inner.go --
package inner
--- outer2/go.mod --
-module example.net/outer
-
-go 1.21