]> Cypherpunks repositories - gostls13.git/commit
cmd/go: correct staleness for packages in modules
authorMichael Matloob <matloob@golang.org>
Fri, 21 Oct 2022 15:25:53 +0000 (11:25 -0400)
committerMichael Matloob <matloob@golang.org>
Fri, 21 Oct 2022 20:57:57 +0000 (20:57 +0000)
commit5b606a9d2b7649532fe25794fa6b99bd24e7697c
treeab340ccb693574d7be29a4a21839c8dd665f71cd
parentd5efd0dd63a8beb5cc57ae7d25f9c60d5dea5c65
cmd/go: correct staleness for packages in modules

Packages in modules don't have a Target set for them, so the current
logic for determining staleness always reports them as stale. Instead it
should be reporting whether "go install" would do anything, and sholud
be false after a go install. If a package does not have a Target,
instead check to see whether we've cached its build artifact.

Change-Id: Ie7bdb234944353f6c2727bd8bf939cc27ddf3f18
Reviewed-on: https://go-review.googlesource.com/c/go/+/444619
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/cmd/go/internal/work/buildid.go
src/cmd/go/testdata/script/mod_get_commit.txt
src/cmd/go/testdata/script/mod_stale.txt [new file with mode: 0644]