mirror of
https://github.com/golang/go
synced 2024-11-11 18:51:37 -07:00
cmd/go/internal/modload: address comment and test issues from CL 496635
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>
This commit is contained in:
parent
962753b015
commit
992afd9d54
@ -916,7 +916,7 @@ func tidyPrunedRoots(ctx context.Context, mainModule module.Version, old *Requir
|
||||
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
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ require example.net/outer/inner v0.1.0 // indirect
|
||||
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 --
|
||||
@ -61,13 +61,9 @@ module example.net/outer/inner
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user