Commit e54bc92a authored by Lynn Boger's avatar Lynn Boger

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: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 32bb13ab
......@@ -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"
}
}
......
......@@ -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'.")
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment