-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
CherryPickApprovedUsed during the release process for point releasesUsed during the release process for point releasesFrozenDueToAgeGoCommandcmd/gocmd/goNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.TestingAn issue that has been verified to require only test changes, not just a test failure.An issue that has been verified to require only test changes, not just a test failure.
Milestone
Description
What version of Go are you using (go version)?
$ go version go version go1.15.7 darwin/amd64
Does this issue reproduce with the latest release?
Yes.
It can be reproduced in Go 1.15.7 and also Go 1.15.6, although it did not reproduce with Go 1.15.6 when it was released, which suggests something external changed (maybe a new v0.1.0 tag or rewritten history in x/tools).
(Go 1.14 doesn't have this test.)
What operating system and processor architecture are you using (go env)?
go env Output
$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/Users/dmitshur/Library/Caches/go-build" GOENV="/Users/dmitshur/Library/Application Support/go/env" GOEXE="" GOFLAGS="-mod=readonly" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/dmitshur/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/dmitshur/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/zb/5p8cwfhj29gf_m8vdy8ylmlr00jwcj/T/go-build049596360=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
$ go test -v -count=1 -run='TestScript/get_update_unknown_protocol' cmd/go
What did you expect to see?
A passing test, like on tip.
Details
=== RUN TestScript
=== RUN TestScript/get_update_unknown_protocol
=== PAUSE TestScript/get_update_unknown_protocol
=== CONT TestScript/get_update_unknown_protocol
go test proxy running at GOPROXY=http://127.0.0.1:49412/mod
script_test.go:213:
WORK=$WORK
PATH=/var/folders/zb/5p8cwfhj29gf_m8vdy8ylmlr00jwcj/T/cmd-go-test-354286626/tmpdir1343679603/testbin:/Users/dmitshur/gotip/bin:/Users/dmitshur/google-cloud-sdk/bin:/Users/dmitshur/homebrew/bin:/Users/dmitshur/homebrew/sbin:/usr/local/git/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Apple/usr/bin:/Users/dmitshur/go/bin:/Users/dmitshur/bin
HOME=/no-home
CCACHE_DISABLE=1
GOARCH=amd64
GOCACHE=/Users/dmitshur/Library/Caches/go-build
GODEBUG=
GOEXE=
GOEXPSTRING=none
GOOS=darwin
GOPATH=$WORK/gopath
GOPROXY=http://127.0.0.1:49412/mod
GOPRIVATE=
GOROOT=/Users/dmitshur/gotip
GOROOT_FINAL=
TESTGO_GOROOT=/Users/dmitshur/gotip
GOSUMDB=localhost.localdev/sumdb+00000c67+AcTrnkbUA+TU4heY3hkjiSES/DSQniBqIeQ/YppAUtK6
GONOPROXY=
GONOSUMDB=
GOVCS=*:all
PWD=$WORK/gopath/src
TMPDIR=$WORK/tmp
devnull=/dev/null
goversion=1.16
:=:
> [!net] skip
> [!exec:git] skip
> env GO111MODULE=off
# Clone the repo via HTTPS manually. (0.507s)
> exec git clone -q https://github.com/golang/example github.com/golang/example
# Configure the repo to use a protocol unknown to cmd/go
# that still actually works. (1.956s)
> cd github.com/golang/example
$WORK/gopath/src/github.com/golang/example
> exec git remote set-url origin xyz://github.com/golang/example
> exec git config --local url.https://github.com/.insteadOf xyz://github.com/
> go get -d -u -f github.com/golang/example/hello
PASS
--- PASS: TestScript (0.01s)
--- PASS: TestScript/get_update_unknown_protocol (2.55s)
PASS
ok cmd/go 4.290s
What did you see instead?
A failing test.
=== RUN TestScript
=== RUN TestScript/get_update_unknown_protocol
=== PAUSE TestScript/get_update_unknown_protocol
=== CONT TestScript/get_update_unknown_protocol
go test proxy running at GOPROXY=http://127.0.0.1:49311/mod
go proxy: open /usr/local/go/src/cmd/go/testdata/mod/golang.org_x_tools_v0.0.0-20210112183307-1e6ecd4bf1b0.txt: no such file or directory
go proxy: no archive golang.org/x/tools v0.0.0-20210112183307-1e6ecd4bf1b0: file does not exist
script_test.go:210:
WORK=$WORK
PATH=/var/folders/zb/5p8cwfhj29gf_m8vdy8ylmlr00jwcj/T/cmd-go-test-301557091/tmpdir171918694/testbin:/Users/dmitshur/google-cloud-sdk/bin:/Users/dmitshur/homebrew/bin:/Users/dmitshur/homebrew/sbin:/usr/local/git/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Apple/usr/bin:/Users/dmitshur/go/bin:/Users/dmitshur/bin
HOME=/no-home
CCACHE_DISABLE=1
GOARCH=amd64
GOCACHE=/Users/dmitshur/Library/Caches/go-build
GODEBUG=
GOEXE=
GOEXPSTRING=framepointer
GOOS=darwin
GOPATH=$WORK/gopath
GOPROXY=http://127.0.0.1:49311/mod
GOPRIVATE=
GOROOT=/usr/local/go
GOROOT_FINAL=
TESTGO_GOROOT=/usr/local/go
GOSUMDB=localhost.localdev/sumdb+00000c67+AcTrnkbUA+TU4heY3hkjiSES/DSQniBqIeQ/YppAUtK6
GONOPROXY=
GONOSUMDB=
PWD=$WORK/gopath/src
TMPDIR=$WORK/tmp
devnull=/dev/null
goversion=1.15
:=:
> [!net] skip
> [!exec:git] skip
# Clone the repo via HTTPS manually. (0.532s)
> exec git clone -q https://github.com/golang/example github.com/golang/example
# Configure the repo to use a protocol unknown to cmd/go
# that still actually works. (0.038s)
> cd github.com/golang/example
$WORK/gopath/src/github.com/golang/example
> exec git remote set-url origin xyz://github.com/golang/example
> exec git config --local url.https://github.com/.insteadOf xyz://github.com/
> go get -d -u -f github.com/golang/example/hello
[stderr]
go get: -f flag is a no-op when using modules
go: golang.org/x/tools@v0.0.0-20210112183307-1e6ecd4bf1b0: reading http://127.0.0.1:49311/mod/golang.org/x/tools/@v/v0.0.0-20210112183307-1e6ecd4bf1b0.mod: 404 Not Found
server response: 404 page not found
[exit status 1]
FAIL: testdata/script/get_update_unknown_protocol.txt:13: unexpected command failure
--- FAIL: TestScript (0.01s)
--- FAIL: TestScript/get_update_unknown_protocol (0.61s)
FAIL
FAIL cmd/go 2.483s
FAIL
Also see the linux-386-longtest and linux-amd64-longtest builders at https://build.golang.org/?repo=&branch=release-branch.go1.15.
Metadata
Metadata
Assignees
Labels
CherryPickApprovedUsed during the release process for point releasesUsed during the release process for point releasesFrozenDueToAgeGoCommandcmd/gocmd/goNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.TestingAn issue that has been verified to require only test changes, not just a test failure.An issue that has been verified to require only test changes, not just a test failure.