]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modindex: clean modroot and pkgdir for openIndexPackage
authorMichael Matloob <matloob@golang.org>
Tue, 25 Feb 2025 17:51:04 +0000 (12:51 -0500)
committerMichael Matloob <matloob@golang.org>
Fri, 28 Feb 2025 22:09:39 +0000 (14:09 -0800)
commit68949049742f737ac4d54f48b1291f3b73d1b4f6
tree7afbb42119611edd813ff71eddcfc3bc122a9951
parent64feded8afd7280f533e09138efa31b6772e34ce
cmd/go/internal/modindex: clean modroot and pkgdir for openIndexPackage

GetPackage is sometimes called with a modroot or pkgdir that ends with a
path separator, and sometimes without. Clean them before passing them to
openIndexPackage to deduplicate calls to mcache.Do and action entry
files.

This shouldn't affect #71698 but was discovered while debugging that
issue.

Change-Id: I6a7fa4de93f45801504abea11bd97f6c6577f296
Reviewed-on: https://go-review.googlesource.com/c/go/+/652435
Reviewed-by: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/go/internal/modindex/read.go
src/cmd/go/testdata/script/list_modindex_dupactionid.txt [new file with mode: 0644]