1
0
mirror of https://github.com/golang/go synced 2024-11-18 09:54:57 -07:00

runtime, cmd/go: roll back stale message, test detail

Some debugging code was recently added to:
1) provide more detail for the stale reason when it is
determined that a package is stale
2) provide file and package time and date information when
it is determined that runtime.a is stale

This backs out those those debugging messages.

Fixes #19116

Change-Id: I8dd0cbe29324820275b481d8bbb78ff2c5fbc362
Reviewed-on: https://go-review.googlesource.com/37382
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Lynn Boger 2017-02-22 13:32:54 -05:00
parent 32bb13abbe
commit e54bc92a2c
2 changed files with 3 additions and 14 deletions

View File

@ -1507,13 +1507,7 @@ func isStale(p *Package) (bool, string) {
// Package is stale if a dependency is.
for _, p1 := range p.Internal.Deps {
if p1.Stale {
// Don't add "stale dependency" if it is
// already there.
if strings.HasPrefix(p1.StaleReason, "stale dependency") {
return true, p1.StaleReason
}
msg := fmt.Sprintf("stale dependency %s: %s", p1.Name, p1.StaleReason)
return true, msg
return true, "stale dependency"
}
}
@ -1551,8 +1545,7 @@ func isStale(p *Package) (bool, string) {
// Package is stale if a dependency is, or if a dependency is newer.
for _, p1 := range p.Internal.Deps {
if p1.Internal.Target != "" && olderThan(p1.Internal.Target) {
msg := fmt.Sprintf("newer dependency %s ", p1.Internal.Target)
return true, msg
return true, "newer dependency"
}
}
@ -1619,8 +1612,7 @@ func isStale(p *Package) (bool, string) {
srcs := str.StringList(p.GoFiles, p.CFiles, p.CXXFiles, p.MFiles, p.HFiles, p.FFiles, p.SFiles, p.CgoFiles, p.SysoFiles, p.SwigFiles, p.SwigCXXFiles)
for _, src := range srcs {
if olderThan(filepath.Join(p.Dir, src)) {
msg := fmt.Sprintf("newer source file %s", filepath.Join(p.Dir, src))
return true, msg
return true, "newer source file"
}
}

View File

@ -170,9 +170,6 @@ func checkStaleRuntime(t *testing.T) {
t.Logf("go list -f {{.StaleReason}} failed: %v", err)
}
t.Logf("go list -f {{.StaleReason}} runtime:\n%s", out)
out, err = testEnv(exec.Command("ls", "-lR", "--full-time", runtime.GOROOT())).CombinedOutput()
t.Logf("%s", out)
staleRuntimeErr = fmt.Errorf("Stale runtime.a. Run 'go install runtime'.")
}
})