Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: test fails with the latest tip version #29030

Closed
YoshikiShibata opened this issue Nov 30, 2018 · 6 comments
Closed

cmd/go: test fails with the latest tip version #29030

YoshikiShibata opened this issue Nov 30, 2018 · 6 comments
Labels
FrozenDueToAge GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@YoshikiShibata
Copy link

YoshikiShibata commented Nov 30, 2018

Please answer these questions before submitting your issue. Thanks!

What did you do?

Tried to rebuild from the latest tip version of source code with all.bash

What did you expect to see?

All tests pass.

What did you see instead?

$ git rev-parse HEAD
2140975ebde164ea1eaa70fc72775c03567f2bc9

cmd/go failed at test:

ok  	cmd/fix	14.568s
go test proxy starting
go test proxy running at GOPROXY=http://127.0.0.1:62728/mod
go proxy: no archive rsc.io v1.5.0
go proxy: no archive example.com/split/subpkg v1.0.0
go proxy: no archive golang.org/x/text/language 14c0d48
go proxy: no archive golang.org/x/text/language 14c0d48
--- FAIL: TestScript (0.01s)
    --- FAIL: TestScript/mod_why (1.93s)
        script_test.go:182: 
            > env GO111MODULE=on
            > go list -test all
            [stdout]
            mymodule/x
            mymodule/y
            mymodule/z
            [stderr]
            go: finding rsc.io/quote v1.5.2
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            go: downloading rsc.io/quote v1.5.2
            go: extracting rsc.io/quote v1.5.2
            can't load package: package rsc.io/quote: unknown import path "rsc.io/quote": rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2.tmp-758603708 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2: permission denied
            can't load test package: package rsc.io/quote: unknown import path "rsc.io/quote": rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2.tmp-758603708 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_why.txt:3: unexpected command failure
            
    --- FAIL: TestScript/mod_verify (3.24s)
        script_test.go:182: 
            # With good go.sum, verify succeeds by avoiding download. (0.756s)
            # With bad go.sum, verify succeeds by avoiding download. (0.103s)
            # With bad go.sum, sync (which must download) fails.
            # Even if the bad sum is in the old legacy go.modverify file. (0.235s)
            # With good go.sum, sync works (and moves go.modverify to go.sum). (1.306s)
            > rm go.sum
            > cp go.sum.good go.modverify
            > go mod tidy
            [stderr]
            go: downloading rsc.io/quote v1.1.0
            go: extracting rsc.io/quote v1.1.0
            > exists $GOPATH/pkg/mod/cache/download/rsc.io/quote/@v/v1.1.0.zip
            > exists $GOPATH/pkg/mod/rsc.io/quote@v1.1.0/quote.go
            FAIL: testdata/script/mod_verify.txt:26: $WORK/gopath/pkg/mod/rsc.io/quote@v1.1.0/quote.go does not exist
            
    --- FAIL: TestScript/mod_vendor_build (1.32s)
        script_test.go:182: 
            # initial conditions: using sampler v1.3.0, not listed in go.mod. (1.084s)
            > go list -deps
            [stdout]
            rsc.io/quote
            m
            [stderr]
            go: finding rsc.io/quote v1.5.2
            go: downloading rsc.io/quote v1.5.2
            go: extracting rsc.io/quote v1.5.2
            > stdout rsc.io/sampler
            FAIL: testdata/script/mod_vendor_build.txt:5: no match for `rsc.io/sampler` found in stdout
            
    --- FAIL: TestScript/mod_tidy_sum (2.54s)
        script_test.go:182: 
            # go.sum should list directly used modules and dependencies (2.523s)
            > go get rsc.io/quote@v1.5.2
            [stderr]
            go: finding rsc.io/quote v1.5.2
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            go: downloading rsc.io/quote v1.5.2
            go: extracting rsc.io/quote v1.5.2
            package rsc.io/quote: unknown import path "rsc.io/quote": rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2.tmp-128221794 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_tidy_sum.txt:4: unexpected command failure
            
    --- FAIL: TestScript/mod_tidy_quote (2.13s)
        script_test.go:182: 
            # Check that mod tidy does not introduce repeated
            # require statements when input go.mod has quoted requirements. (2.002s)
            > env GO111MODULE=on
            > go mod tidy
            [stderr]
            go: finding rsc.io/quote v1.5.2
            go: downloading rsc.io/quote v1.5.2
            go: extracting rsc.io/quote v1.5.2
            > grep -count=1 rsc.io/quote go.mod
            [go.mod]
            module x
            
            go 1.12
            
            FAIL: testdata/script/mod_tidy_quote.txt:6: no match for `rsc.io/quote` found in go.mod
            
    --- FAIL: TestScript/mod_tidy_replace (3.04s)
        script_test.go:182: 
            # From inside the module, 'go list -m all' should NOT include transitive
            # requirements of modules that have been replaced. (0.094s)
            # From outside the module, 'go list -m all' should include them. (2.047s)
            # 'go list all' should add indirect requirements to satisfy the packages
            # imported from replacement modules. (0.743s)
            > ! grep 'rsc.io/sampler' go.mod
            > ! grep 'golang.org/x/text' go.mod
            > go list all
            [stdout]
            example.com/tidy
            rsc.io/quote/v3
            [stderr]
            go: finding rsc.io/sampler v1.99.99
            go: finding golang.org/x/text v0.3.0
            go: downloading rsc.io/sampler v1.99.99
            go: downloading golang.org/x/text v0.3.0
            go: extracting golang.org/x/text v0.3.0
            go: extracting rsc.io/sampler v1.99.99
            can't load package: not-rsc.io/quote/v3/quote.go:5:2: unknown import path "golang.org/x/text/language": cannot find module providing package golang.org/x/text/language
            can't load package: not-rsc.io/quote/v3/quote.go:4:2: unknown import path "rsc.io/sampler": cannot find module providing package rsc.io/sampler
            [exit status 1]
            FAIL: testdata/script/mod_tidy_replace.txt:22: unexpected command failure
            
    --- FAIL: TestScript/mod_symlink (1.32s)
        script_test.go:182: 
            # 'go list' should resolve modules of imported packages. (1.303s)
            > go list -deps -f '{{.Module}}'
            [stdout]
            <nil>
            golang.org/issue/28107
            [stderr]
            go: finding golang.org/x/text v0.3.0
            go: downloading golang.org/x/text v0.3.0
            go: extracting golang.org/x/text v0.3.0
            > stdout golang.org/x/text
            FAIL: testdata/script/mod_symlink.txt:6: no match for `golang.org/x/text` found in stdout
            
    --- FAIL: TestScript/mod_test (1.54s)
        script_test.go:182: 
            # TODO(bcmills): Convert the 'go test' calls below to 'go list -test' once 'go
            # list' is more sensitive to package loading errors.
            # A test in the module's root package should work. (1.311s)
            > cd a/
            $WORK/gopath/src/a
            > cp go.mod.empty go.mod
            > go test
            [stdout]
            FAIL	example.com/user/a [setup failed]
            [stderr]
            go: finding rsc.io/quote v1.5.2
            go: downloading rsc.io/quote v1.5.2
            go: extracting rsc.io/quote v1.5.2
            # example.com/user/a
            a_test.go:4:8: unknown import path "rsc.io/quote": cannot find module providing package rsc.io/quote
            [exit status 1]
            FAIL: testdata/script/mod_test.txt:9: unexpected command failure
            
    --- FAIL: TestScript/mod_readonly (2.26s)
        script_test.go:182: 
            # -mod=readonly must not resolve missing modules nor update go.mod
            #
            # TODO(bcmills): 'go list' should suffice, but today it does not fail due to
            # unresolved imports. When that is fixed, use 'go list' instead of 'go list all'. (0.619s)
            # update go.mod - go get allowed (1.622s)
            > go get rsc.io/quote
            [stderr]
            go: finding rsc.io/quote v1.5.2
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            go: downloading rsc.io/quote v1.5.2
            go: extracting rsc.io/quote v1.5.2
            package rsc.io/quote: unknown import path "rsc.io/quote": rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2.tmp-340289094 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_readonly.txt:15: unexpected command failure
            
    --- FAIL: TestScript/mod_replace (2.28s)
        script_test.go:182: 
            # Make sure the test builds without replacement. (2.211s)
            > go build -o a1.exe .
            [stderr]
            go: finding rsc.io/quote/v3 v3.0.0
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            go: downloading rsc.io/quote/v3 v3.0.0
            go: extracting rsc.io/quote/v3 v3.0.0
            main.go:5:2: unknown import path "rsc.io/quote/v3": rename $WORK/gopath/pkg/mod/rsc.io/quote/v3@v3.0.0.tmp-956870682 $WORK/gopath/pkg/mod/rsc.io/quote/v3@v3.0.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_replace.txt:6: unexpected command failure
            
    --- FAIL: TestScript/mod_domain_root (1.64s)
        script_test.go:182: 
            # Module paths that are domain roots should resolve.
            # (example.com not example.com/something) (0.719s)
            > env GO111MODULE=on
            > go build
            [stderr]
            go: finding example.com v1.0.0
            go: downloading example.com v1.0.0
            go: extracting example.com v1.0.0
            x.go:2:8: unknown import path "example.com": cannot find module providing package example.com
            [exit status 1]
            FAIL: testdata/script/mod_domain_root.txt:5: unexpected command failure
            
    --- FAIL: TestScript/mod_query_exclude (2.50s)
        script_test.go:182: 
            # get excluded version (0.134s)
            # get non-excluded version (2.147s)
            > cp go.mod1 go.mod
            > go get rsc.io/quote@v1.5.1
            [stderr]
            go: finding rsc.io/quote v1.5.1
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            go: downloading rsc.io/quote v1.5.1
            go: extracting rsc.io/quote v1.5.1
            package rsc.io/quote: unknown import path "rsc.io/quote": rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.1.tmp-433879344 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.1: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_query_exclude.txt:10: unexpected command failure
            
    --- FAIL: TestScript/mod_outside (3.03s)
        script_test.go:182: 
            # This script tests commands in module mode outside of any module.
            #
            # First, ensure that we really are in module mode, and that we really don't have
            # a go.mod file. (0.049s)
            # 'go list' without arguments implicitly operates on the current directory,
            # which is not in a module. (0.093s)
            # 'go list' in the working directory should fail even if there is a a 'package
            # main' present: without a main module, we do not know its package path. (0.045s)
            # 'go list all' lists the transitive import graph of the main module,
            # which is empty if there is no main module. (0.092s)
            # 'go list' on standard-library packages should work, since they do not depend
            # on the contents of any module. (1.598s)
            # 'go list -m' with an explicit version should resolve that version. (0.090s)
            # 'go list -m -versions' should succeed even without an explicit version. (0.051s)
            # 'go list -m <mods> all' does not include the dependencies of <mods> in the computation of 'all'. (0.087s)
            # 'go clean' should skip the current directory if it isn't in a module. (0.045s)
            # 'go mod graph' should not display anything, since there are no active modules. (0.059s)
            # 'go mod why' should report that nothing is a dependency. (0.117s)
            # 'go mod edit', 'go mod tidy', and 'go mod fmt' should fail:
            # there is no go.mod file to edit. (0.118s)
            # 'go mod download' should download exactly the requested module without dependencies. (0.424s)
            > rm -r $GOPATH/pkg/mod/cache/download/example.com
            > go mod download example.com/printversion@v1.0.0
            [stderr]
            go: finding example.com/printversion v1.0.0
            example.com/printversion@v1.0.0: rename $WORK/gopath/pkg/mod/example.com/printversion@v1.0.0.tmp-036241841 $WORK/gopath/pkg/mod/example.com/printversion@v1.0.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_outside.txt:82: unexpected command failure
            
    --- FAIL: TestScript/mod_multirepo (0.86s)
        script_test.go:182: 
            # initial standalone module should use no downloaded modules (0.088s)
            # v2 import should use a downloaded module
            # both without an explicit go.mod entry ... (0.607s)
            > cp tmp/use_v2.go x.go
            > go list -deps -f {{.Dir}}
            [stdout]
            $WORK/gopath/src
            [stderr]
            go: finding rsc.io/quote/v2 v2.0.1
            go: downloading rsc.io/quote/v2 v2.0.1
            go: extracting rsc.io/quote/v2 v2.0.1
            > stdout 'pkg[\\/]mod[\\/]rsc.io[\\/]quote[\\/]v2@v2.0.1$'
            FAIL: testdata/script/mod_multirepo.txt:11: no match for `pkg[\\/]mod[\\/]rsc.io[\\/]quote[\\/]v2@v2.0.1$` found in stdout
            
    --- FAIL: TestScript/mod_modinfo (1.09s)
        script_test.go:182: 
            # Test to ensure runtime/debug.ReadBuildInfo parses
            # the modinfo embedded in a binary by the go tool
            # when module is enabled. (1.084s)
            > env GO111MODULE=on
            > cd x
            $WORK/gopath/src/x
            > go mod edit -require=rsc.io/quote@v1.5.2
            > go mod edit -replace=rsc.io/quote@v1.5.2=rsc.io/quote@v1.0.0
            > go run main.go
            [stderr]
            go: finding rsc.io/quote v1.0.0
            go: downloading rsc.io/quote v1.0.0
            go: extracting rsc.io/quote v1.0.0
            main.go:4:8: unknown import path "rsc.io/quote": rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.0.0.tmp-472206302 $WORK/gopath/pkg/mod/rsc.io/quote@v1.0.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_modinfo.txt:10: unexpected command failure
            
    --- FAIL: TestScript/mod_list_dir (1.92s)
        script_test.go:182: 
            # go list with path to directory should work (1.905s)
            > env GO111MODULE=off
            > go list -f '{{.ImportPath}}' $GOROOT/src/math
            [stdout]
            math
            > stdout ^math$
            > env GO111MODULE=on
            > go list -f '{{.ImportPath}}' $GOROOT/src/math
            [stdout]
            math
            [stderr]
            go: finding rsc.io/quote v1.5.2
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            > stdout ^math$
            > go list -f '{{.ImportPath}}' .
            [stdout]
            x
            > stdout ^x$
            > ! go list -f '{{.ImportPath}}' $GOPATH/pkg/mod/rsc.io/quote@v1.5.2
            [stderr]
            go: no such directory $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2
            [exit status 1]
            > stderr '^go: no such directory.*quote@v1.5.2'
            > go mod download rsc.io/quote@v1.5.2
            [stderr]
            rsc.io/quote@v1.5.2: rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2.tmp-518152643 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_list_dir.txt:14: unexpected command failure
            
    --- FAIL: TestScript/mod_list (1.89s)
        script_test.go:182: 
            # list {{.Dir}} shows main module and go.mod but not not-yet-downloaded dependency dir. (1.160s)
            # list {{.Dir}} shows dependency after download (and go list without -m downloads it) (0.244s)
            > go list -f '{{.Dir}}' rsc.io/quote
            [stderr]
            go: downloading rsc.io/quote v1.5.2
            go: extracting rsc.io/quote v1.5.2
            can't load package: package rsc.io/quote: unknown import path "rsc.io/quote": rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2.tmp-377419513 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_list.txt:9: unexpected command failure
            
    --- FAIL: TestScript/mod_internal (1.73s)
        script_test.go:182: 
            # golang.org/x/internal should be importable from other golang.org/x modules. (0.782s)
            > rm go.mod
            > go mod init golang.org/x/anything
            [stderr]
            go: creating new go.mod: module golang.org/x/anything
            > go build .
            [stderr]
            go: finding golang.org/x/internal v0.1.0
            go: downloading golang.org/x/internal v0.1.0
            go: extracting golang.org/x/internal v0.1.0
            useinternal.go:2:8: unknown import path "golang.org/x/internal/subtle": cannot find module providing package golang.org/x/internal/subtle
            [exit status 1]
            FAIL: testdata/script/mod_internal.txt:6: unexpected command failure
            
    --- FAIL: TestScript/mod_install_versioned (0.48s)
        script_test.go:182: 
            > env GO111MODULE=on
            > go list -f '{{.Target}}' rsc.io/fortune
            [stderr]
            go: finding rsc.io/fortune v1.0.0
            go: downloading rsc.io/fortune v1.0.0
            go: extracting rsc.io/fortune v1.0.0
            can't load package: package rsc.io/fortune: unknown import path "rsc.io/fortune": cannot find module providing package rsc.io/fortune
            [exit status 1]
            FAIL: testdata/script/mod_install_versioned.txt:3: unexpected command failure
            
    --- FAIL: TestScript/mod_import (2.09s)
        script_test.go:182: 
            # latest rsc.io/quote should be v1.5.2 not v1.5.3-pre1 (1.208s)
            > go list
            [stdout]
            x
            [stderr]
            go: finding rsc.io/quote v1.5.2
            go: downloading rsc.io/quote v1.5.2
            go: extracting rsc.io/quote v1.5.2
            > go list -m all
            [stdout]
            x
            > stdout 'rsc.io/quote v1.5.2'
            FAIL: testdata/script/mod_import.txt:6: no match for `rsc.io/quote v1.5.2` found in stdout
            
    --- FAIL: TestScript/mod_gopkg_unstable (1.67s)
        script_test.go:182: 
            > env GO111MODULE=on
            > cp go.mod.empty go.mod
            > go get -d gopkg.in/dummy.v2-unstable
            [stderr]
            go: finding gopkg.in/dummy.v2-unstable v2.0.0
            go: downloading gopkg.in/dummy.v2-unstable v2.0.0
            go: extracting gopkg.in/dummy.v2-unstable v2.0.0
            package gopkg.in/dummy.v2-unstable: unknown import path "gopkg.in/dummy.v2-unstable": rename $WORK/gopath/pkg/mod/gopkg.in/dummy.v2-unstable@v2.0.0.tmp-980001416 $WORK/gopath/pkg/mod/gopkg.in/dummy.v2-unstable@v2.0.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_gopkg_unstable.txt:4: unexpected command failure
            
    --- FAIL: TestScript/mod_getmode_vendor (2.43s)
        script_test.go:182: 
            > env GO111MODULE=on
            > go get -m rsc.io/quote@v1.5.1
            [stderr]
            go: finding rsc.io/quote v1.5.1
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            > go mod vendor
            [stderr]
            go: downloading rsc.io/quote v1.5.1
            go: extracting rsc.io/quote v1.5.1
            go: no dependencies to vendor
            > env GOPATH=$WORK/empty
            > env GOPROXY=file:///nonexist
            > go list -mod=vendor
            [stdout]
            x
            > go list -mod=vendor -m -f '{{.Path}} {{.Version}} {{.Dir}}' all
            [stdout]
            x  $WORK/gopath/src
            rsc.io/quote v1.5.1 $WORK/gopath/src/vendor/rsc.io/quote
            > stdout '^rsc.io/quote v1.5.1 .*vendor[\\/]rsc.io[\\/]quote$'
            > stdout '^golang.org/x/text v0.0.0.* .*vendor[\\/]golang.org[\\/]x[\\/]text$'
            FAIL: testdata/script/mod_getmode_vendor.txt:11: no match for `^golang.org/x/text v0.0.0.* .*vendor[\\/]golang.org[\\/]x[\\/]text$` found in stdout
            
    --- FAIL: TestScript/mod_get_upgrade (2.22s)
        script_test.go:182: 
            > env GO111MODULE=on
            > go get rsc.io/quote@v1.5.1
            [stderr]
            go: finding rsc.io/quote v1.1.0
            go: finding rsc.io/quote v1.5.1
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            go: downloading rsc.io/quote v1.5.1
            go: extracting rsc.io/quote v1.5.1
            package rsc.io/quote: unknown import path "rsc.io/quote": rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.1.tmp-560064490 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.1: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_get_upgrade.txt:3: unexpected command failure
            
    --- FAIL: TestScript/mod_get_moved (0.30s)
        script_test.go:182: 
            # A 'go get' that worked at a previous version should continue to work at that version,
            # even if the package was subsequently moved into a submodule. (0.292s)
            > go mod init example.com/foo
            [stderr]
            go: creating new go.mod: module example.com/foo
            > go get -d example.com/split/subpkg@v1.0.0
            [stderr]
            go: finding example.com/split/subpkg v1.0.0
            go: finding example.com/split v1.0.0
            go: downloading example.com/split v1.0.0
            go: extracting example.com/split v1.0.0
            go get example.com/split/subpkg@v1.0.0: rename $WORK/gopath/pkg/mod/example.com/split@v1.0.0.tmp-026599500 $WORK/gopath/pkg/mod/example.com/split@v1.0.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_get_moved.txt:6: unexpected command failure
            
    --- FAIL: TestScript/mod_get_indirect (5.76s)
        script_test.go:182: 
            # get -u should find quote v1.5.2 (3.800s)
            # it should also update x/text later than requested by v1.5.2 (0.047s)
            # importing an empty module root as a package makes it direct.
            # TODO(bcmills): This doesn't seem correct. Fix is in the next change. (0.804s)
            # indirect tag should be removed upon seeing direct import. (0.096s)
            > cp $WORK/tmp/uselang.go x.go
            > go list
            [stdout]
            x
            [stderr]
            go: extracting golang.org/x/text v0.3.0
            > grep 'rsc.io/quote v1.5.2$' go.mod
            > grep 'golang.org/x/text [v0-9a-f\.-]+$' go.mod
            [go.mod]
            module x
            
            require (
            	golang.org/x/text v0.3.0 // indirect
            	rsc.io/quote v1.5.2
            	rsc.io/sampler v1.99.99 // indirect
            )
            
            FAIL: testdata/script/mod_get_indirect.txt:24: no match for `golang.org/x/text [v0-9a-f\.-]+$` found in go.mod
            
    --- FAIL: TestScript/mod_get_incompatible (2.44s)
        script_test.go:182: 
            > env GO111MODULE=on
            > go list x
            [stdout]
            x
            [stderr]
            go: finding rsc.io/breaker v2.0.0+incompatible
            go: downloading rsc.io/breaker v2.0.0+incompatible
            go: extracting rsc.io/breaker v2.0.0+incompatible
            > go list -m all
            [stdout]
            x
            > stdout 'rsc.io/breaker v2.0.0\+incompatible'
            FAIL: testdata/script/mod_get_incompatible.txt:5: no match for `rsc.io/breaker v2.0.0\+incompatible` found in stdout
            
    --- FAIL: TestScript/mod_get_commit (1.76s)
        script_test.go:182: 
            # @commit should resolve
            # golang.org/x/text/language@commit should not resolve with -m,
            # because that's not a module path. (0.188s)
            # ... but it should work without -m.
            # because of -d, the compiler should not run (1.188s)
            > go get -d -x golang.org/x/text/language@14c0d48
            [stderr]
            go: finding golang.org/x/text/language 14c0d48
            go: finding golang.org/x/text 14c0d48
            go: downloading golang.org/x/text v0.3.0
            go: extracting golang.org/x/text v0.3.0
            go get golang.org/x/text/language@14c0d48: rename $WORK/gopath/pkg/mod/golang.org/x/text@v0.3.0.tmp-960156459 $WORK/gopath/pkg/mod/golang.org/x/text@v0.3.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_get_commit.txt:11: unexpected command failure
            
    --- FAIL: TestScript/mod_get_downgrade (4.26s)
        script_test.go:182: 
            # downgrade sampler should downgrade quote (4.097s)
            > go get rsc.io/sampler@v1.0.0
            [stderr]
            go: finding rsc.io/quote v1.5.1
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            go: finding rsc.io/sampler v1.0.0
            go: finding rsc.io/quote v1.5.0
            go: finding rsc.io/quote v1.4.0
            go: downloading rsc.io/sampler v1.0.0
            go: extracting rsc.io/sampler v1.0.0
            package rsc.io/sampler: unknown import path "rsc.io/sampler": rename $WORK/gopath/pkg/mod/rsc.io/sampler@v1.0.0.tmp-136974630 $WORK/gopath/pkg/mod/rsc.io/sampler@v1.0.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_get_downgrade.txt:4: unexpected command failure
            
    --- FAIL: TestScript/mod_download (0.32s)
        script_test.go:182: 
            # download with version should print nothing (0.301s)
            > go mod download rsc.io/quote@v1.5.0
            [stderr]
            go: finding rsc.io/quote v1.5.0
            rsc.io/quote@v1.5.0: rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.0.tmp-440644945 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_download.txt:4: unexpected command failure
            
    --- FAIL: TestScript/mod_doc (2.95s)
        script_test.go:182: 
            # go doc should find module documentation (2.932s)
            > env GO111MODULE=on
            > go doc y
            [stdout]
            package y // import "x/y"
            
            Package y is the next to last package of the alphabet.
            
            [stderr]
            go: finding rsc.io/quote v1.5.2
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            > stdout 'Package y is.*alphabet'
            > stdout 'import "x/y"'
            > go doc x/y
            [stdout]
            package y // import "x/y"
            
            Package y is the next to last package of the alphabet.
            
            > stdout 'Package y is.*alphabet'
            > ! go doc quote.Hello
            [stderr]
            doc: symbol quote is not a type in package x installed in "."
            exit status 1
            [exit status 1]
            > stderr 'doc: symbol quote is not a type' # because quote is not in local cache
            > go list rsc.io/quote # now it is
            [stderr]
            go: downloading rsc.io/quote v1.5.2
            go: extracting rsc.io/quote v1.5.2
            can't load package: package rsc.io/quote: unknown import path "rsc.io/quote": rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2.tmp-670650976 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_doc.txt:12: unexpected command failure
            
    --- FAIL: TestScript/mod_clean_cache (3.23s)
        script_test.go:182: 
            > env GO111MODULE=on
            > go mod download rsc.io/quote@v1.5.0
            [stderr]
            go: finding rsc.io/quote v1.5.0
            rsc.io/quote@v1.5.0: rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.0.tmp-670725657 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_clean_cache.txt:3: unexpected command failure
            
    --- FAIL: TestScript/mod_concurrent (3.45s)
        script_test.go:182: 
            # Concurrent builds should succeed, even if they need to download modules. (3.238s)
            > go build ./x &
            > go build ./y
            [stderr]
            go: finding golang.org/x/text v0.3.0
            go: finding rsc.io/sampler v1.0.0
            go: downloading rsc.io/sampler v1.0.0
            go: extracting rsc.io/sampler v1.0.0
            y/y.go:3:8: unknown import path "rsc.io/sampler": rename $WORK/gopath/pkg/mod/rsc.io/sampler@v1.0.0.tmp-283975607 $WORK/gopath/pkg/mod/rsc.io/sampler@v1.0.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_concurrent.txt:5: unexpected command failure
            
    --- FAIL: TestScript/mod_case_cgo (1.11s)
        script_test.go:182: 
            > [!cgo] skip
            > env GO111MODULE=on
            > go get rsc.io/CGO
            [stderr]
            go: finding rsc.io/CGO v1.0.0
            go: downloading rsc.io/CGO v1.0.0
            go: extracting rsc.io/CGO v1.0.0
            package rsc.io/CGO: unknown import path "rsc.io/CGO": rename $WORK/gopath/pkg/mod/rsc.io/!c!g!o@v1.0.0.tmp-643146412 $WORK/gopath/pkg/mod/rsc.io/!c!g!o@v1.0.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_case_cgo.txt:5: unexpected command failure
            
    --- FAIL: TestScript/mod_case (1.60s)
        script_test.go:182: 
            > env GO111MODULE=on
            > go get rsc.io/QUOTE
            [stderr]
            go: finding rsc.io/QUOTE v1.5.2
            go: finding rsc.io/quote v1.5.2
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            go: downloading rsc.io/QUOTE v1.5.2
            go: extracting rsc.io/QUOTE v1.5.2
            package rsc.io/QUOTE: unknown import path "rsc.io/QUOTE": rename $WORK/gopath/pkg/mod/rsc.io/!q!u!o!t!e@v1.5.2.tmp-100092888 $WORK/gopath/pkg/mod/rsc.io/!q!u!o!t!e@v1.5.2: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_case.txt:3: unexpected command failure
            
FAIL
FAIL	cmd/go	352.090s

Does this issue reproduce with the latest release (go1.11.2)?

N/A

System details

go version devel +2140975ebd Thu Nov 29 22:23:02 2018 +0000 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/yoshiki/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/yoshiki/gocode:/Users/yoshiki/exercises/gpl:/Users/yoshiki/oak"
GOPROXY=""
GORACE=""
GOROOT="/Users/yoshiki/tools/go"
GOTMPDIR=""
GOTOOLDIR="/Users/yoshiki/tools/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
GOROOT/bin/go version: go version devel +2140975ebd Thu Nov 29 22:23:02 2018 +0000 darwin/amd64
GOROOT/bin/go tool compile -V: compile version devel +2140975ebd Thu Nov 29 22:23:02 2018 +0000
uname -v: Darwin Kernel Version 18.2.0: Fri Oct  5 19:41:49 PDT 2018; root:xnu-4903.221.2~2/RELEASE_X86_64
ProductName:	Mac OS X
ProductVersion:	10.14.1
BuildVersion:	18B75
lldb --version: lldb-1000.0.38.2
  Swift-4.2
@agnivade
Copy link
Contributor

Can't seem to reproduce it on linux/amd64.

go version devel +2140975ebd Thu Nov 29 22:23:02 2018 +0000 linux/amd64

@odeke-em
Copy link
Member

Thank you for reporting this issue @YoshikiShibata!

@agnivade thanks for the hint that perhaps it might be on just be on darwin. Even as far as ba2e8f6 I can reproduce it on darwin.
I'll page @bcmills @rsc @FiloSottile as I see some interesting errors e.g.

$ go test -v -run=TestAccidentalGitCheckout
=== RUN   TestAccidentalGitCheckout
=== PAUSE TestAccidentalGitCheckout
=== CONT  TestAccidentalGitCheckout
--- FAIL: TestAccidentalGitCheckout (1.34s)
    go_test.go:1331: running testgo [get -u vcs-test.golang.org/go/test1-svn-git]
    go_test.go:1331: standard error:
    go_test.go:1331: # cd .; svn checkout https://vcs-test.golang.org/svn/test1-svn-git /var/folders/v3/7z434qpx5v3bw0wh8h2myfpw0000gn/T/gotest859356351/src/vcs-test.golang.org/go/test1-svn-git
        svn: E170013: Unable to connect to a repository at URL 'https://vcs-test.golang.org/svn/test1-svn-git'
        svn: E230001: Server SSL certificate verification failed: issuer is not trusted
        package vcs-test.golang.org/go/test1-svn-git: exit status 1
        
    go_test.go:1331: testgo failed as expected: exit status 1
    go_test.go:1332: get did not fail for right reason
    go_test.go:1332: pattern src[\\/]vcs-test.* uses git, but parent .*src[\\/]vcs-test.* uses svn not found in standard error
FAIL
exit status 1
FAIL	cmd/go	3.058s

@odeke-em odeke-em added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 30, 2018
@ALTree ALTree added this to the Go1.12 milestone Nov 30, 2018
@mvdan
Copy link
Member

mvdan commented Nov 30, 2018

@YoshikiShibata have you tried running go clean -modcache and re-running the tests? I see some "permission denied" errors, so perhaps your cache is not writeable by the current user or somehow corrupted.

@mvdan mvdan added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Nov 30, 2018
@YoshikiShibata
Copy link
Author

YoshikiShibata commented Nov 30, 2018

Seems no change:

ok  	cmd/fix	11.377s
go test proxy starting
go test proxy running at GOPROXY=http://127.0.0.1:49645/mod
go proxy: no archive rsc.io v1.5.0
go proxy: no archive example.com/split/subpkg v1.0.0
go proxy: no archive golang.org/x/text/language 14c0d48
go proxy: no archive golang.org/x/text/language 14c0d48
--- FAIL: TestScript (0.00s)
    --- FAIL: TestScript/mod_why (2.10s)
        script_test.go:182: 
            > env GO111MODULE=on
            > go list -test all
            [stdout]
            mymodule/x
            mymodule/y
            mymodule/z
            [stderr]
            go: finding rsc.io/quote v1.5.2
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            go: downloading rsc.io/quote v1.5.2
            go: extracting rsc.io/quote v1.5.2
            can't load package: package rsc.io/quote: unknown import path "rsc.io/quote": rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2.tmp-889197357 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2: permission denied
            can't load test package: package rsc.io/quote: unknown import path "rsc.io/quote": rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2.tmp-889197357 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_why.txt:3: unexpected command failure
            
    --- FAIL: TestScript/mod_verify (2.64s)
        script_test.go:182: 
            # With good go.sum, verify succeeds by avoiding download. (0.461s)
            # With bad go.sum, verify succeeds by avoiding download. (0.572s)
            # With bad go.sum, sync (which must download) fails.
            # Even if the bad sum is in the old legacy go.modverify file. (0.100s)
            # With good go.sum, sync works (and moves go.modverify to go.sum). (1.236s)
            > rm go.sum
            > cp go.sum.good go.modverify
            > go mod tidy
            [stderr]
            go: downloading rsc.io/quote v1.1.0
            go: extracting rsc.io/quote v1.1.0
            > exists $GOPATH/pkg/mod/cache/download/rsc.io/quote/@v/v1.1.0.zip
            > exists $GOPATH/pkg/mod/rsc.io/quote@v1.1.0/quote.go
            FAIL: testdata/script/mod_verify.txt:26: $WORK/gopath/pkg/mod/rsc.io/quote@v1.1.0/quote.go does not exist
            
    --- FAIL: TestScript/mod_vendor_build (1.05s)
        script_test.go:182: 
            # initial conditions: using sampler v1.3.0, not listed in go.mod. (0.857s)
            > go list -deps
            [stdout]
            rsc.io/quote
            m
            [stderr]
            go: finding rsc.io/quote v1.5.2
            go: downloading rsc.io/quote v1.5.2
            go: extracting rsc.io/quote v1.5.2
            > stdout rsc.io/sampler
            FAIL: testdata/script/mod_vendor_build.txt:5: no match for `rsc.io/sampler` found in stdout
            
    --- FAIL: TestScript/mod_tidy_sum (3.01s)
        script_test.go:182: 
            # go.sum should list directly used modules and dependencies (2.410s)
            > go get rsc.io/quote@v1.5.2
            [stderr]
            go: finding rsc.io/quote v1.5.2
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            go: downloading rsc.io/quote v1.5.2
            go: extracting rsc.io/quote v1.5.2
            package rsc.io/quote: unknown import path "rsc.io/quote": rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2.tmp-141990776 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_tidy_sum.txt:4: unexpected command failure
            
    --- FAIL: TestScript/mod_tidy_quote (1.59s)
        script_test.go:182: 
            # Check that mod tidy does not introduce repeated
            # require statements when input go.mod has quoted requirements. (1.367s)
            > env GO111MODULE=on
            > go mod tidy
            [stderr]
            go: finding rsc.io/quote v1.5.2
            go: downloading rsc.io/quote v1.5.2
            go: extracting rsc.io/quote v1.5.2
            > grep -count=1 rsc.io/quote go.mod
            [go.mod]
            module x
            
            go 1.12
            
            FAIL: testdata/script/mod_tidy_quote.txt:6: no match for `rsc.io/quote` found in go.mod
            
    --- FAIL: TestScript/mod_tidy_replace (3.72s)
        script_test.go:182: 
            # From inside the module, 'go list -m all' should NOT include transitive
            # requirements of modules that have been replaced. (0.090s)
            # From outside the module, 'go list -m all' should include them. (2.496s)
            # 'go list all' should add indirect requirements to satisfy the packages
            # imported from replacement modules. (1.106s)
            > ! grep 'rsc.io/sampler' go.mod
            > ! grep 'golang.org/x/text' go.mod
            > go list all
            [stdout]
            example.com/tidy
            rsc.io/quote/v3
            [stderr]
            go: finding rsc.io/sampler v1.99.99
            go: finding golang.org/x/text v0.3.0
            go: downloading rsc.io/sampler v1.99.99
            go: downloading golang.org/x/text v0.3.0
            go: extracting rsc.io/sampler v1.99.99
            go: extracting golang.org/x/text v0.3.0
            can't load package: not-rsc.io/quote/v3/quote.go:5:2: unknown import path "golang.org/x/text/language": cannot find module providing package golang.org/x/text/language
            can't load package: not-rsc.io/quote/v3/quote.go:4:2: unknown import path "rsc.io/sampler": cannot find module providing package rsc.io/sampler
            [exit status 1]
            FAIL: testdata/script/mod_tidy_replace.txt:22: unexpected command failure
            
    --- FAIL: TestScript/mod_test (1.81s)
        script_test.go:182: 
            # TODO(bcmills): Convert the 'go test' calls below to 'go list -test' once 'go
            # list' is more sensitive to package loading errors.
            # A test in the module's root package should work. (1.061s)
            > cd a/
            $WORK/gopath/src/a
            > cp go.mod.empty go.mod
            > go test
            [stdout]
            FAIL	example.com/user/a [setup failed]
            [stderr]
            go: finding rsc.io/quote v1.5.2
            go: downloading rsc.io/quote v1.5.2
            go: extracting rsc.io/quote v1.5.2
            # example.com/user/a
            a_test.go:4:8: unknown import path "rsc.io/quote": cannot find module providing package rsc.io/quote
            [exit status 1]
            FAIL: testdata/script/mod_test.txt:9: unexpected command failure
            
    --- FAIL: TestScript/mod_symlink (1.03s)
        script_test.go:182: 
            # 'go list' should resolve modules of imported packages. (0.853s)
            > go list -deps -f '{{.Module}}'
            [stdout]
            <nil>
            golang.org/issue/28107
            [stderr]
            go: finding golang.org/x/text v0.3.0
            go: downloading golang.org/x/text v0.3.0
            go: extracting golang.org/x/text v0.3.0
            > stdout golang.org/x/text
            FAIL: testdata/script/mod_symlink.txt:6: no match for `golang.org/x/text` found in stdout
            
    --- FAIL: TestScript/mod_replace (2.50s)
        script_test.go:182: 
            # Make sure the test builds without replacement. (2.076s)
            > go build -o a1.exe .
            [stderr]
            go: finding rsc.io/quote/v3 v3.0.0
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            go: downloading rsc.io/quote/v3 v3.0.0
            go: extracting rsc.io/quote/v3 v3.0.0
            main.go:5:2: unknown import path "rsc.io/quote/v3": rename $WORK/gopath/pkg/mod/rsc.io/quote/v3@v3.0.0.tmp-876263914 $WORK/gopath/pkg/mod/rsc.io/quote/v3@v3.0.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_replace.txt:6: unexpected command failure
            
    --- FAIL: TestScript/mod_readonly (2.56s)
        script_test.go:182: 
            # -mod=readonly must not resolve missing modules nor update go.mod
            #
            # TODO(bcmills): 'go list' should suffice, but today it does not fail due to
            # unresolved imports. When that is fixed, use 'go list' instead of 'go list all'. (0.736s)
            # update go.mod - go get allowed (1.811s)
            > go get rsc.io/quote
            [stderr]
            go: finding rsc.io/quote v1.5.2
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            go: downloading rsc.io/quote v1.5.2
            go: extracting rsc.io/quote v1.5.2
            package rsc.io/quote: unknown import path "rsc.io/quote": rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2.tmp-505429345 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_readonly.txt:15: unexpected command failure
            
    --- FAIL: TestScript/mod_query_exclude (2.51s)
        script_test.go:182: 
            # get excluded version (0.113s)
            # get non-excluded version (2.327s)
            > cp go.mod1 go.mod
            > go get rsc.io/quote@v1.5.1
            [stderr]
            go: finding rsc.io/quote v1.5.1
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            go: downloading rsc.io/quote v1.5.1
            go: extracting rsc.io/quote v1.5.1
            package rsc.io/quote: unknown import path "rsc.io/quote": rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.1.tmp-798200079 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.1: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_query_exclude.txt:10: unexpected command failure
            
    --- FAIL: TestScript/mod_outside (2.93s)
        script_test.go:182: 
            # This script tests commands in module mode outside of any module.
            #
            # First, ensure that we really are in module mode, and that we really don't have
            # a go.mod file. (0.057s)
            # 'go list' without arguments implicitly operates on the current directory,
            # which is not in a module. (0.090s)
            # 'go list' in the working directory should fail even if there is a a 'package
            # main' present: without a main module, we do not know its package path. (0.046s)
            # 'go list all' lists the transitive import graph of the main module,
            # which is empty if there is no main module. (0.087s)
            # 'go list' on standard-library packages should work, since they do not depend
            # on the contents of any module. (1.535s)
            # 'go list -m' with an explicit version should resolve that version. (0.087s)
            # 'go list -m -versions' should succeed even without an explicit version. (0.044s)
            # 'go list -m <mods> all' does not include the dependencies of <mods> in the computation of 'all'. (0.092s)
            # 'go clean' should skip the current directory if it isn't in a module. (0.049s)
            # 'go mod graph' should not display anything, since there are no active modules. (0.044s)
            # 'go mod why' should report that nothing is a dependency. (0.044s)
            # 'go mod edit', 'go mod tidy', and 'go mod fmt' should fail:
            # there is no go.mod file to edit. (0.130s)
            # 'go mod download' should download exactly the requested module without dependencies. (0.610s)
            > rm -r $GOPATH/pkg/mod/cache/download/example.com
            > go mod download example.com/printversion@v1.0.0
            [stderr]
            go: finding example.com/printversion v1.0.0
            example.com/printversion@v1.0.0: rename $WORK/gopath/pkg/mod/example.com/printversion@v1.0.0.tmp-240083562 $WORK/gopath/pkg/mod/example.com/printversion@v1.0.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_outside.txt:82: unexpected command failure
            
    --- FAIL: TestScript/mod_multirepo (0.82s)
        script_test.go:182: 
            # initial standalone module should use no downloaded modules (0.092s)
            # v2 import should use a downloaded module
            # both without an explicit go.mod entry ... (0.542s)
            > cp tmp/use_v2.go x.go
            > go list -deps -f {{.Dir}}
            [stdout]
            $WORK/gopath/src
            [stderr]
            go: finding rsc.io/quote/v2 v2.0.1
            go: downloading rsc.io/quote/v2 v2.0.1
            go: extracting rsc.io/quote/v2 v2.0.1
            > stdout 'pkg[\\/]mod[\\/]rsc.io[\\/]quote[\\/]v2@v2.0.1$'
            FAIL: testdata/script/mod_multirepo.txt:11: no match for `pkg[\\/]mod[\\/]rsc.io[\\/]quote[\\/]v2@v2.0.1$` found in stdout
            
    --- FAIL: TestScript/mod_modinfo (1.08s)
        script_test.go:182: 
            # Test to ensure runtime/debug.ReadBuildInfo parses
            # the modinfo embedded in a binary by the go tool
            # when module is enabled. (1.072s)
            > env GO111MODULE=on
            > cd x
            $WORK/gopath/src/x
            > go mod edit -require=rsc.io/quote@v1.5.2
            > go mod edit -replace=rsc.io/quote@v1.5.2=rsc.io/quote@v1.0.0
            > go run main.go
            [stderr]
            go: finding rsc.io/quote v1.0.0
            go: downloading rsc.io/quote v1.0.0
            go: extracting rsc.io/quote v1.0.0
            main.go:4:8: unknown import path "rsc.io/quote": rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.0.0.tmp-743531424 $WORK/gopath/pkg/mod/rsc.io/quote@v1.0.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_modinfo.txt:10: unexpected command failure
            
    --- FAIL: TestScript/mod_list_dir (2.95s)
        script_test.go:182: 
            # go list with path to directory should work (2.941s)
            > env GO111MODULE=off
            > go list -f '{{.ImportPath}}' $GOROOT/src/math
            [stdout]
            math
            > stdout ^math$
            > env GO111MODULE=on
            > go list -f '{{.ImportPath}}' $GOROOT/src/math
            [stdout]
            math
            [stderr]
            go: finding rsc.io/quote v1.5.2
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            > stdout ^math$
            > go list -f '{{.ImportPath}}' .
            [stdout]
            x
            > stdout ^x$
            > ! go list -f '{{.ImportPath}}' $GOPATH/pkg/mod/rsc.io/quote@v1.5.2
            [stderr]
            go: no such directory $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2
            [exit status 1]
            > stderr '^go: no such directory.*quote@v1.5.2'
            > go mod download rsc.io/quote@v1.5.2
            [stderr]
            rsc.io/quote@v1.5.2: rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2.tmp-456231899 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_list_dir.txt:14: unexpected command failure
            
    --- FAIL: TestScript/mod_list (1.43s)
        script_test.go:182: 
            # list {{.Dir}} shows main module and go.mod but not not-yet-downloaded dependency dir. (1.064s)
            # list {{.Dir}} shows dependency after download (and go list without -m downloads it) (0.224s)
            > go list -f '{{.Dir}}' rsc.io/quote
            [stderr]
            go: downloading rsc.io/quote v1.5.2
            go: extracting rsc.io/quote v1.5.2
            can't load package: package rsc.io/quote: unknown import path "rsc.io/quote": rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2.tmp-703268196 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_list.txt:9: unexpected command failure
            
    --- FAIL: TestScript/mod_internal (0.58s)
        script_test.go:182: 
            # golang.org/x/internal should be importable from other golang.org/x modules. (0.564s)
            > rm go.mod
            > go mod init golang.org/x/anything
            [stderr]
            go: creating new go.mod: module golang.org/x/anything
            > go build .
            [stderr]
            go: finding golang.org/x/internal v0.1.0
            go: downloading golang.org/x/internal v0.1.0
            go: extracting golang.org/x/internal v0.1.0
            useinternal.go:2:8: unknown import path "golang.org/x/internal/subtle": cannot find module providing package golang.org/x/internal/subtle
            [exit status 1]
            FAIL: testdata/script/mod_internal.txt:6: unexpected command failure
            
    --- FAIL: TestScript/mod_install_versioned (1.74s)
        script_test.go:182: 
            > env GO111MODULE=on
            > go list -f '{{.Target}}' rsc.io/fortune
            [stderr]
            go: finding rsc.io/fortune v1.0.0
            go: downloading rsc.io/fortune v1.0.0
            go: extracting rsc.io/fortune v1.0.0
            can't load package: package rsc.io/fortune: unknown import path "rsc.io/fortune": cannot find module providing package rsc.io/fortune
            [exit status 1]
            FAIL: testdata/script/mod_install_versioned.txt:3: unexpected command failure
            
    --- FAIL: TestScript/mod_import (1.67s)
        script_test.go:182: 
            # latest rsc.io/quote should be v1.5.2 not v1.5.3-pre1 (1.496s)
            > go list
            [stdout]
            x
            [stderr]
            go: finding rsc.io/quote v1.5.2
            go: downloading rsc.io/quote v1.5.2
            go: extracting rsc.io/quote v1.5.2
            > go list -m all
            [stdout]
            x
            > stdout 'rsc.io/quote v1.5.2'
            FAIL: testdata/script/mod_import.txt:6: no match for `rsc.io/quote v1.5.2` found in stdout
            
    --- FAIL: TestScript/mod_gopkg_unstable (1.85s)
        script_test.go:182: 
            > env GO111MODULE=on
            > cp go.mod.empty go.mod
            > go get -d gopkg.in/dummy.v2-unstable
            [stderr]
            go: finding gopkg.in/dummy.v2-unstable v2.0.0
            go: downloading gopkg.in/dummy.v2-unstable v2.0.0
            go: extracting gopkg.in/dummy.v2-unstable v2.0.0
            package gopkg.in/dummy.v2-unstable: unknown import path "gopkg.in/dummy.v2-unstable": rename $WORK/gopath/pkg/mod/gopkg.in/dummy.v2-unstable@v2.0.0.tmp-759689331 $WORK/gopath/pkg/mod/gopkg.in/dummy.v2-unstable@v2.0.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_gopkg_unstable.txt:4: unexpected command failure
            
    --- FAIL: TestScript/mod_getmode_vendor (2.11s)
        script_test.go:182: 
            > env GO111MODULE=on
            > go get -m rsc.io/quote@v1.5.1
            [stderr]
            go: finding rsc.io/quote v1.5.1
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            > go mod vendor
            [stderr]
            go: downloading rsc.io/quote v1.5.1
            go: extracting rsc.io/quote v1.5.1
            go: no dependencies to vendor
            > env GOPATH=$WORK/empty
            > env GOPROXY=file:///nonexist
            > go list -mod=vendor
            [stdout]
            x
            > go list -mod=vendor -m -f '{{.Path}} {{.Version}} {{.Dir}}' all
            [stdout]
            x  $WORK/gopath/src
            rsc.io/quote v1.5.1 $WORK/gopath/src/vendor/rsc.io/quote
            > stdout '^rsc.io/quote v1.5.1 .*vendor[\\/]rsc.io[\\/]quote$'
            > stdout '^golang.org/x/text v0.0.0.* .*vendor[\\/]golang.org[\\/]x[\\/]text$'
            FAIL: testdata/script/mod_getmode_vendor.txt:11: no match for `^golang.org/x/text v0.0.0.* .*vendor[\\/]golang.org[\\/]x[\\/]text$` found in stdout
            
    --- FAIL: TestScript/mod_get_upgrade (2.59s)
        script_test.go:182: 
            > env GO111MODULE=on
            > go get rsc.io/quote@v1.5.1
            [stderr]
            go: finding rsc.io/quote v1.1.0
            go: finding rsc.io/quote v1.5.1
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            go: downloading rsc.io/quote v1.5.1
            go: extracting rsc.io/quote v1.5.1
            package rsc.io/quote: unknown import path "rsc.io/quote": rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.1.tmp-461761420 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.1: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_get_upgrade.txt:3: unexpected command failure
            
    --- FAIL: TestScript/mod_get_moved (0.40s)
        script_test.go:182: 
            # A 'go get' that worked at a previous version should continue to work at that version,
            # even if the package was subsequently moved into a submodule. (0.388s)
            > go mod init example.com/foo
            [stderr]
            go: creating new go.mod: module example.com/foo
            > go get -d example.com/split/subpkg@v1.0.0
            [stderr]
            go: finding example.com/split/subpkg v1.0.0
            go: finding example.com/split v1.0.0
            go: downloading example.com/split v1.0.0
            go: extracting example.com/split v1.0.0
            go get example.com/split/subpkg@v1.0.0: rename $WORK/gopath/pkg/mod/example.com/split@v1.0.0.tmp-398644483 $WORK/gopath/pkg/mod/example.com/split@v1.0.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_get_moved.txt:6: unexpected command failure
            
    --- FAIL: TestScript/mod_get_indirect (5.47s)
        script_test.go:182: 
            # get -u should find quote v1.5.2 (3.765s)
            # it should also update x/text later than requested by v1.5.2 (0.071s)
            # importing an empty module root as a package makes it direct.
            # TODO(bcmills): This doesn't seem correct. Fix is in the next change. (1.042s)
            # indirect tag should be removed upon seeing direct import. (0.406s)
            > cp $WORK/tmp/uselang.go x.go
            > go list
            [stdout]
            x
            [stderr]
            go: extracting golang.org/x/text v0.3.0
            > grep 'rsc.io/quote v1.5.2$' go.mod
            > grep 'golang.org/x/text [v0-9a-f\.-]+$' go.mod
            [go.mod]
            module x
            
            require (
            	golang.org/x/text v0.3.0 // indirect
            	rsc.io/quote v1.5.2
            	rsc.io/sampler v1.99.99 // indirect
            )
            
            FAIL: testdata/script/mod_get_indirect.txt:24: no match for `golang.org/x/text [v0-9a-f\.-]+$` found in go.mod
            
    --- FAIL: TestScript/mod_get_incompatible (2.76s)
        script_test.go:182: 
            > env GO111MODULE=on
            > go list x
            [stdout]
            x
            [stderr]
            go: finding rsc.io/breaker v2.0.0+incompatible
            go: downloading rsc.io/breaker v2.0.0+incompatible
            go: extracting rsc.io/breaker v2.0.0+incompatible
            > go list -m all
            [stdout]
            x
            > stdout 'rsc.io/breaker v2.0.0\+incompatible'
            FAIL: testdata/script/mod_get_incompatible.txt:5: no match for `rsc.io/breaker v2.0.0\+incompatible` found in stdout
            
    --- FAIL: TestScript/mod_get_commit (1.68s)
        script_test.go:182: 
            # @commit should resolve
            # golang.org/x/text/language@commit should not resolve with -m,
            # because that's not a module path. (0.404s)
            # ... but it should work without -m.
            # because of -d, the compiler should not run (1.050s)
            > go get -d -x golang.org/x/text/language@14c0d48
            [stderr]
            go: finding golang.org/x/text/language 14c0d48
            go: finding golang.org/x/text 14c0d48
            go: downloading golang.org/x/text v0.3.0
            go: extracting golang.org/x/text v0.3.0
            go get golang.org/x/text/language@14c0d48: rename $WORK/gopath/pkg/mod/golang.org/x/text@v0.3.0.tmp-730375250 $WORK/gopath/pkg/mod/golang.org/x/text@v0.3.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_get_commit.txt:11: unexpected command failure
            
    --- FAIL: TestScript/mod_get_downgrade (4.16s)
        script_test.go:182: 
            # downgrade sampler should downgrade quote (3.977s)
            > go get rsc.io/sampler@v1.0.0
            [stderr]
            go: finding rsc.io/quote v1.5.1
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            go: finding rsc.io/sampler v1.0.0
            go: finding rsc.io/quote v1.5.0
            go: finding rsc.io/quote v1.4.0
            go: downloading rsc.io/sampler v1.0.0
            go: extracting rsc.io/sampler v1.0.0
            package rsc.io/sampler: unknown import path "rsc.io/sampler": rename $WORK/gopath/pkg/mod/rsc.io/sampler@v1.0.0.tmp-813257521 $WORK/gopath/pkg/mod/rsc.io/sampler@v1.0.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_get_downgrade.txt:4: unexpected command failure
            
    --- FAIL: TestScript/mod_download (0.51s)
        script_test.go:182: 
            # download with version should print nothing (0.498s)
            > go mod download rsc.io/quote@v1.5.0
            [stderr]
            go: finding rsc.io/quote v1.5.0
            rsc.io/quote@v1.5.0: rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.0.tmp-633158937 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_download.txt:4: unexpected command failure
            
    --- FAIL: TestScript/mod_domain_root (1.00s)
        script_test.go:182: 
            # Module paths that are domain roots should resolve.
            # (example.com not example.com/something) (0.986s)
            > env GO111MODULE=on
            > go build
            [stderr]
            go: finding example.com v1.0.0
            go: downloading example.com v1.0.0
            go: extracting example.com v1.0.0
            x.go:2:8: unknown import path "example.com": cannot find module providing package example.com
            [exit status 1]
            FAIL: testdata/script/mod_domain_root.txt:5: unexpected command failure
            
    --- FAIL: TestScript/mod_doc (3.16s)
        script_test.go:182: 
            # go doc should find module documentation (3.018s)
            > env GO111MODULE=on
            > go doc y
            [stdout]
            package y // import "x/y"
            
            Package y is the next to last package of the alphabet.
            
            [stderr]
            go: finding rsc.io/quote v1.5.2
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            > stdout 'Package y is.*alphabet'
            > stdout 'import "x/y"'
            > go doc x/y
            [stdout]
            package y // import "x/y"
            
            Package y is the next to last package of the alphabet.
            
            > stdout 'Package y is.*alphabet'
            > ! go doc quote.Hello
            [stderr]
            doc: symbol quote is not a type in package x installed in "."
            exit status 1
            [exit status 1]
            > stderr 'doc: symbol quote is not a type' # because quote is not in local cache
            > go list rsc.io/quote # now it is
            [stderr]
            go: downloading rsc.io/quote v1.5.2
            go: extracting rsc.io/quote v1.5.2
            can't load package: package rsc.io/quote: unknown import path "rsc.io/quote": rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2.tmp-184642991 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.2: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_doc.txt:12: unexpected command failure
            
    --- FAIL: TestScript/mod_concurrent (2.62s)
        script_test.go:182: 
            # Concurrent builds should succeed, even if they need to download modules. (2.464s)
            > go build ./x &
            > go build ./y
            [stderr]
            go: finding rsc.io/sampler v1.0.0
            go: finding golang.org/x/text v0.3.0
            go: downloading rsc.io/sampler v1.0.0
            go: extracting rsc.io/sampler v1.0.0
            y/y.go:3:8: unknown import path "rsc.io/sampler": rename $WORK/gopath/pkg/mod/rsc.io/sampler@v1.0.0.tmp-942616646 $WORK/gopath/pkg/mod/rsc.io/sampler@v1.0.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_concurrent.txt:5: unexpected command failure
            
    --- FAIL: TestScript/mod_clean_cache (1.44s)
        script_test.go:182: 
            > env GO111MODULE=on
            > go mod download rsc.io/quote@v1.5.0
            [stderr]
            go: finding rsc.io/quote v1.5.0
            rsc.io/quote@v1.5.0: rename $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.0.tmp-365345084 $WORK/gopath/pkg/mod/rsc.io/quote@v1.5.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_clean_cache.txt:3: unexpected command failure
            
    --- FAIL: TestScript/mod_case_cgo (2.33s)
        script_test.go:182: 
            > [!cgo] skip
            > env GO111MODULE=on
            > go get rsc.io/CGO
            [stderr]
            go: finding rsc.io/CGO v1.0.0
            go: downloading rsc.io/CGO v1.0.0
            go: extracting rsc.io/CGO v1.0.0
            package rsc.io/CGO: unknown import path "rsc.io/CGO": rename $WORK/gopath/pkg/mod/rsc.io/!c!g!o@v1.0.0.tmp-048077607 $WORK/gopath/pkg/mod/rsc.io/!c!g!o@v1.0.0: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_case_cgo.txt:5: unexpected command failure
            
    --- FAIL: TestScript/mod_case (2.70s)
        script_test.go:182: 
            > env GO111MODULE=on
            > go get rsc.io/QUOTE
            [stderr]
            go: finding rsc.io/QUOTE v1.5.2
            go: finding rsc.io/quote v1.5.2
            go: finding rsc.io/sampler v1.3.0
            go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
            go: downloading rsc.io/QUOTE v1.5.2
            go: extracting rsc.io/QUOTE v1.5.2
            package rsc.io/QUOTE: unknown import path "rsc.io/QUOTE": rename $WORK/gopath/pkg/mod/rsc.io/!q!u!o!t!e@v1.5.2.tmp-814182023 $WORK/gopath/pkg/mod/rsc.io/!q!u!o!t!e@v1.5.2: permission denied
            [exit status 1]
            FAIL: testdata/script/mod_case.txt:3: unexpected command failure
            
FAIL
FAIL	cmd/go	240.094s

@bcmills bcmills self-assigned this Nov 30, 2018
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/151798 mentions this issue: cmd/go/internal/modfetch: make directories read-only after renaming, not before

@bcmills
Copy link
Contributor

bcmills commented Nov 30, 2018

Folks, please use <details> blocks for long pastes. This issue is really hard to read.

(I'm going to edit the previous comments to add them.)

@bcmills bcmills added the NeedsFix The path to resolution is known, but the work has not been done. label Nov 30, 2018
@gopherbot gopherbot removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 30, 2018
@bcmills bcmills added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. GoCommand cmd/go modules and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Nov 30, 2018
@gopherbot gopherbot removed the NeedsFix The path to resolution is known, but the work has not been done. label Nov 30, 2018
@golang golang locked and limited conversation to collaborators Nov 30, 2019
@rsc rsc unassigned bcmills Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

7 participants