]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modindex: ignore non-source files for index
authorMichael Matloob <matloob@golang.org>
Wed, 5 Oct 2022 16:54:00 +0000 (12:54 -0400)
committerMichael Matloob <matloob@golang.org>
Wed, 5 Oct 2022 18:59:21 +0000 (18:59 +0000)
commit881a16542e357fd85ac492424021ff380175675a
treed6169df5225767c68811e343a86d6bbabfd91c09
parent3a37b112816d0002ed29804401560e0419b11a92
cmd/go/internal/modindex: ignore non-source files for index

We were saving non-go file information in the module index files,
leading in an unnecessary increase in memory usage in modules
containing many non-go files. This was a bug because this information
is never used. Don't save that information.

For #54226

Change-Id: I0644064f83f96e3a9f43b7e66ca94d69d9603376
Reviewed-on: https://go-review.googlesource.com/c/go/+/439118
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/cmd/go/internal/modindex/build.go
src/cmd/go/internal/modindex/index_test.go
src/cmd/go/internal/modindex/scan.go
src/cmd/go/internal/modindex/testdata/ignore_non_source/a.syso [new file with mode: 0644]
src/cmd/go/internal/modindex/testdata/ignore_non_source/b.go [new file with mode: 0644]
src/cmd/go/internal/modindex/testdata/ignore_non_source/bar.json [new file with mode: 0644]
src/cmd/go/internal/modindex/testdata/ignore_non_source/baz.log [new file with mode: 0644]
src/cmd/go/internal/modindex/testdata/ignore_non_source/c.c [new file with mode: 0644]