]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fix handling of builtin packages in WriteCoverMetaFilesFile
authorThan McIntosh <thanm@google.com>
Wed, 12 Jun 2024 14:39:19 +0000 (14:39 +0000)
committerThan McIntosh <thanm@google.com>
Fri, 14 Jun 2024 11:44:29 +0000 (11:44 +0000)
commit1683628d29ca77f9c44804c987c3570c89ffd29d
tree921a8270298e78e202a75667666a493b2a5f7082
parent6d93de2c110f66457f103c33ba496ff2e2bf33af
cmd/go: fix handling of builtin packages in WriteCoverMetaFilesFile

In certain unusual situations we can wind up with a build action for a
dummy (built-in) package as a dependency for the writeCoverMeta
pseudo-action generated when -coverpkg is in effect; this was causing
a panic in WriteCoverMetaFilesFile when it discovered a predecessor
whose Mode field was not "build". Update the code that constructs deps
for writeCoverMeta action to skip dummy builds.

Fixes #67953.

Change-Id: If747aeb9bae061c84290d1e10f6ea7abb0828aca
Reviewed-on: https://go-review.googlesource.com/c/go/+/592202
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/cmd/go/internal/test/test.go
src/cmd/go/testdata/script/test_n_cover_std.txt [new file with mode: 0644]