Skip to content

go get is downloading a large vcs cache and does not succeed #49793

@categorical

Description

@categorical

What version of Go are you using (go version)?

$ go version
go version go1.17.3 windows/amd64

Does this issue reproduce with the latest release?

Yes. It is the latest stable version downloaded from https://go.dev/dl/

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=d:\godev\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=d:\godev
set GOPRIVATE=
set GOPROXY=direct
set GOROOT=D:\opt\golang
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=D:\opt\golang\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.17.3
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=D:\cygwin64\tmp\go-build106806973=/tmp/go-build -gno-record-gcc-switches

What did you do?

I typed in go get -v github.com/go-delve/delve/cmd/dlv to terminal
In addition, I have environment variables set for git to use an http proxy

http_proxy=http://123.23.3.123:12321
https_proxy=http://123.23.3.123:12321
HTTP_PROXY=http://123.23.3.123:12321
HTTPS_PROXY=http://123.23.3.123:12321

What did you expect to see?

I expected to see dlv installed to $GOPATH/bin

What did you see instead?

go get does not finish downloading, and errors out until probably when a network issue occurs

get "golang.org/x/image": found meta tag vcs.metaImport{Prefix:"golang.org/x/image", VCS:"git", RepoRoot:"https://go.googlesource.com/image"} at //golang.org/x/image?go-get=1
go get: github.com/go-delve/delve@v1.7.3 requires
        golang.org/x/tools@v0.1.8-0.20211028023602-8de2a7fd1736: invalid version: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in d:\godev\pkg\mod\cache\vcs\7d9b3b49b55db5b40e68a94007f21a05905d3fda866f685220de88f9c9bad98a: exit status 128:
        error: 1461 bytes of body are still expected
        fatal: the remote end hung up unexpectedly
        fatal: early EOF
        fatal: index-pack failed
        warning: unable to unlink '(NULL)': Invalid argument

The $GOPATH/pkg/mod/cache directory looks like

$ du -sh *
9.4M    download
2.6G    vcs

I would like to know how to let it work with GO111MODULE=on and GOPROXY=direct.
Am I expected to see 2.6GiB (and ever increasing) of vcs cache in this case when installing dlv?

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions