Source: golang-1.13 Source-Version: 1.13.8-1 Severity: normal Hi!
I was trying to rebuild the package and it failed to build due to a test not expecting to find a .git on any of its parent hierarchy. As I managed my home with git, this tripped the test: ,--- […] --- FAIL: TestScript (0.00s) --- FAIL: TestScript/mod_convert_git (0.10s) script_test.go:191: # We should not create a go.mod file unless the user ran 'go mod init' explicitly. # However, we should suggest 'go mod init' if we can find an alternate config file. (0.014s) # The command we suggested should succeed. (0.042s) # We should not suggest creating a go.mod file in $GOROOT, even though there may be a .git/config there. (0.038s) > cd $GOROOT <<HOME>>/<<BUILD-ROOT>>/golang-1.13-1.13.8 > ! go list . [stderr] goroutine 1 [running]: runtime/debug.Stack(0xc000020150, 0xc0001a85a8, 0xc0001ba978) <<HOME>>/<<BUILD-ROOT>>/golang-1.13-1.13.8/src/runtime/debug/stack.go:24 +0x9d runtime/debug.PrintStack() <<HOME>>/<<BUILD-ROOT>>/golang-1.13-1.13.8/src/runtime/debug/stack.go:16 +0x22 cmd/go/internal/modload.die() <<HOME>>/<<BUILD-ROOT>>/golang-1.13-1.13.8/src/cmd/go/internal/modload/init.go:274 +0x2fe cmd/go/internal/modload.ModRoot(0xc000022190, 0x42) <<HOME>>/<<BUILD-ROOT>>/golang-1.13-1.13.8/src/cmd/go/internal/modload/init.go:253 +0x50 cmd/go/internal/modload.ImportPathsQuiet.func1(0xc000184010, 0x1, 0x1, 0x1) <<HOME>>/<<BUILD-ROOT>>/golang-1.13-1.13.8/src/cmd/go/internal/modload/load.go:109 +0x9e3 cmd/go/internal/modload.ImportPathsQuiet.func2(0x9b13e0, 0xc000020030, 0x0) <<HOME>>/<<BUILD-ROOT>>/golang-1.13-1.13.8/src/cmd/go/internal/modload/load.go:205 +0x62 cmd/go/internal/modload.(*loader).load(0xc000198120, 0xc0001a8f28) <<HOME>>/<<BUILD-ROOT>>/golang-1.13-1.13.8/src/cmd/go/internal/modload/load.go:601 +0x115f cmd/go/internal/modload.ImportPathsQuiet(0xc0000a6170, 0x1, 0x1, 0xc00015a270, 0x1, 0x8, 0x0) <<HOME>>/<<BUILD-ROOT>>/golang-1.13-1.13.8/src/cmd/go/internal/modload/load.go:203 +0x2f4 cmd/go/internal/modload.ImportPaths(0xc0000a6170, 0x1, 0x1, 0x340a4f3148b14e4a, 0x0, 0xa417d0) <<HOME>>/<<BUILD-ROOT>>/golang-1.13-1.13.8/src/cmd/go/internal/modload/load.go:57 +0x5d cmd/go/internal/load.ImportPaths(0xc0000a6170, 0x1, 0x1, 0xd0, 0x9e3580, 0x10) <<HOME>>/<<BUILD-ROOT>>/golang-1.13-1.13.8/src/cmd/go/internal/load/pkg.go:2019 +0x5f cmd/go/internal/load.PackagesAndErrors(0xc0000a6170, 0x1, 0x1, 0x0, 0x0, 0x0) <<HOME>>/<<BUILD-ROOT>>/golang-1.13-1.13.8/src/cmd/go/internal/load/pkg.go:1966 +0xe1 cmd/go/internal/load.Packages(0xc0000a6170, 0x1, 0x1, 0xc000182040, 0x0, 0x0) <<HOME>>/<<BUILD-ROOT>>/golang-1.13-1.13.8/src/cmd/go/internal/load/pkg.go:1938 +0x5a cmd/go/internal/list.runList(0xeac0a0, 0xc0000a6170, 0x1, 0x1) <<HOME>>/<<BUILD-ROOT>>/golang-1.13-1.13.8/src/cmd/go/internal/list/list.go:425 +0x21bc main.main() <<HOME>>/<<BUILD-ROOT>>/golang-1.13-1.13.8/src/cmd/go/main.go:189 +0x57f go: cannot find main module, but found .git/config in <<HOME>>/ to create a module there, run: cd ../../../../.. && go mod init [exit status 1] > ! stderr 'go mod init' FAIL: testdata/script/mod_convert_git.txt:19: unexpected match for `(?m)go mod init` found in stderr: go mod init FAIL FAIL cmd/go 52.650s […] `--- I think this is just wrong, and it should at most check the hierarchy up to the the sourece package root directory. Thanks, Guillem