]> Cypherpunks.ru repositories - gostls13.git/commitdiff
runtime, cmd/go: roll back stale message, test detail
authorLynn Boger <laboger@linux.vnet.ibm.com>
Wed, 22 Feb 2017 18:32:54 +0000 (13:32 -0500)
committerLynn Boger <laboger@linux.vnet.ibm.com>
Wed, 1 Mar 2017 18:50:27 +0000 (18:50 +0000)
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>
src/cmd/go/internal/load/pkg.go
src/runtime/crash_test.go

index 9a24733768be3bc6084147cf6fee1bbfafee7223..bf91bb74ada5dd9112e4d2d63a86fd801a9c8738 100644 (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"
                }
        }
 
index 26161fda8d0fac019eccc58a16cf8cbb32831cef..8813c3655a3fb5c1c9d8bb2fde2955336e3dbf80 100644 (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'.")
                }
        })