]> Cypherpunks repositories - gostls13.git/commit
cmd/go: include module root in package index key
authorBryan C. Mills <bcmills@google.com>
Thu, 30 Jun 2022 17:39:57 +0000 (13:39 -0400)
committerGopher Robot <gobot@golang.org>
Thu, 30 Jun 2022 18:20:39 +0000 (18:20 +0000)
commit981d5947aff1551a1c0787664b77c4ac1e8f6c6a
tree8d472d989e050e44f30132b56cb4c1472de18a2e
parent84db00ffd1c0e11180fc433df1ef7521de37a49b
cmd/go: include module root in package index key

The package index format includes the directory relative to the module
root. The module root for a given directory can change even if the
contents of the directory itself do not (by adding or removing a
go.mod file in some parent directory).

Thus, we need to invalidate the index for a package when its module
root location changes.

Fixes #53586 (I think).

Change-Id: I2d9f4de80e16bce75b3106a2bad4a11d8378d037
Reviewed-on: https://go-review.googlesource.com/c/go/+/415475
Reviewed-by: Russ Cox <rsc@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/go/internal/modindex/read.go
src/cmd/go/testdata/script/issue53586.txt [new file with mode: 0644]