From e2c420591cbbd684594a111fa5cdeb40c68964a5 Mon Sep 17 00:00:00 2001 From: Jay Conrod Date: Mon, 19 Oct 2020 14:02:14 -0400 Subject: cmd/go/internal/modload: remove printStackInDie functionality Previously, when running cmd/go tests, if the module root directory is requested when modules are explicitly disabled, we printed a stack trace in addition to the error message that's normally printed. The stack trace isn't that useful, and it makes the actual error hard to find. Change-Id: I8230d668f3f16659f08d0d685124c41b4055c5b9 Reviewed-on: https://go-review.googlesource.com/c/go/+/263659 Trust: Jay Conrod Run-TryBot: Jay Conrod TryBot-Result: Go Bot Reviewed-by: Bryan C. Mills --- src/cmd/go/internal/modload/build.go | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/cmd/go/internal/modload/build.go') diff --git a/src/cmd/go/internal/modload/build.go b/src/cmd/go/internal/modload/build.go index f49b52df56..b9abb0b93c 100644 --- a/src/cmd/go/internal/modload/build.go +++ b/src/cmd/go/internal/modload/build.go @@ -13,7 +13,6 @@ import ( "internal/goroot" "os" "path/filepath" - "runtime/debug" "strings" "cmd/go/internal/base" @@ -312,9 +311,6 @@ func mustFindModule(target, path string) module.Version { return Target } - if printStackInDie { - debug.PrintStack() - } base.Fatalf("build %v: cannot find module for path %v", target, path) panic("unreachable") } -- cgit v1.2.1