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: go mod & go list commands does not do anything after cleaned go cache: go clean -modcache #49410

Closed
Dentrax opened this issue Nov 6, 2021 · 3 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@Dentrax
Copy link

Dentrax commented Nov 6, 2021

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

$ go version
go version go1.17.2 darwin/amd64

Does this issue reproduce with the latest release?

Yes

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

go env Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/furkan.turkal/Library/Caches/go-build"
GOENV="/Users/furkan.turkal/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/furkan.turkal/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/furkan.turkal/go"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/usr/local/Cellar/go/1.17.2/libexec"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.17.2/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.17.2"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/furkan.turkal/go/src/terraform-provider-test/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/nq/vxjjn3311fg4q263qsxrghpcpzgp66/T/go-build1656953382=/tmp/go-build -gno-record-gcc-switches -fno-common"

$ which go
/usr/local/bin/go
$ brew info go
go: stable 1.17.2 (bottled), HEAD
Open source programming language to build simple/reliable/efficient software
https://golang.org
/usr/local/Cellar/go/1.17.2 (10,814 files, 565.8MB) *
  Poured from bottle on 2021-11-05 at 16:48:01
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/go.rb
License: BSD-3-Clause
$ uname -a
Darwin 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64 x86_64

OS: macOS 11.5.2 Intel

What did you do?

Everything was working well until I ran the following command:

$ go clean -modcache

After ran this command, it took almost 1h to complete. Eventually, some cmd/go commands stops working. I waited almost several hours for each the following commands:

$ go mod download
# stuck

$ go list -m golang.org/x/exp
# stuck

Tried to update from 1.17.1 to 1.17.2 using brew, nothing changed.

What did you expect to see?

It should download go mods and list the modules?

What did you see instead?

Nothing happened, seems stucked, and no error out

@seankhliao
Copy link
Member

Can you try running with -x? I see you have GOPROXY=direct, this interacts with the various version control systems directly and will in general be much slower than using a proxy, especially if you have a lot of dependencies

@seankhliao seankhliao added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Nov 6, 2021
@Dentrax
Copy link
Author

Dentrax commented Nov 6, 2021

Thanks! Passing -x increased the verbosity! (i thought it was the -v flag) Just noticed that it mostly awaits for fetching google-api-go-client. And It took too long to complete, but worked eventually.

As a feature request, we can increase the verbosity by default, if you liked the idea i can drop a feature proposal for the following one:

$ go mod download
Creating VCS cache for github.com/googleapis/google-api-go-client (987 MB)
...

I'm closing this one.

@Dentrax Dentrax closed this as completed Nov 6, 2021
@seankhliao
Copy link
Member

you can add it to GOFLAGS to always pass it

@golang golang locked and limited conversation to collaborators Nov 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants