]> Cypherpunks repositories - gostls13.git/commit
internal/goroot: in IsStandardPackage check for go source files
authorMichael Matloob <matloob@golang.org>
Mon, 5 Feb 2024 17:20:45 +0000 (12:20 -0500)
committerMichael Matloob <matloob@golang.org>
Thu, 8 Feb 2024 18:16:28 +0000 (18:16 +0000)
commit4e91c5697a77d9f83a34cbd32704254a9b1bde9f
tree8b888502c691ec59d5bbbe927003acec529b6843
parent151362cf7c94bab5baa33af47249c850fbb941b0
internal/goroot: in IsStandardPackage check for go source files

Be more strict in IsStandardPackage: before this change we'd just
check for the existence of the directory, but now we check to see that
there's at least one .go file in the directory.

Also update some comments in the modindex package to reflect the fact
that an IndexPackage might represent a directory that does not contain
any source files.

Fixes #65406
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest

Change-Id: I82f0c0e7bfcd5bb4df0195c4c8c7fc7c67fae53e
Reviewed-on: https://go-review.googlesource.com/c/go/+/561338
Reviewed-by: Bryan Mills <bcmills@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_testdata.txt [new file with mode: 0644]
src/cmd/go/testdata/script/mod_list.txt
src/internal/goroot/gc.go
src/internal/goroot/gccgo.go