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

Go mod error loading requirements and unknown revisions #39475

Closed
leguminosa opened this issue Jun 9, 2020 · 4 comments
Closed

Go mod error loading requirements and unknown revisions #39475

leguminosa opened this issue Jun 9, 2020 · 4 comments
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@leguminosa
Copy link

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

$ go version
go version go1.12.7 linux/amd64

Does this issue reproduce with the latest release?

haven't tried

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

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/nakama/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/nakama/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/nakama/workspace/tokopedia/rechargeapp/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 -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build149754141=/tmp/go-build -gno-record-gcc-switches"

What did you do?

$ go mod tidy -v

What did you expect to see?

process success

What did you see instead?

go mod tidy -v Output
$ go mod tidy -v
Fetching https://gopkg.in/go-playground/assert.v1?go-get=1
Fetching https://gopkg.in/ini.v1?go-get=1
Fetching https://gopkg.in/h2non/gock.v1?go-get=1
Fetching https://gopkg.in/resty.v1?go-get=1
Parsing meta tags from https://gopkg.in/h2non/gock.v1?go-get=1 (status code 200)
Parsing meta tags from https://gopkg.in/resty.v1?go-get=1 (status code 200)
Parsing meta tags from https://gopkg.in/ini.v1?go-get=1 (status code 200)
Parsing meta tags from https://gopkg.in/go-playground/assert.v1?go-get=1 (status code 200)
get "gopkg.in/ini.v1": found meta tag get.metaImport{Prefix:"gopkg.in/ini.v1", VCS:"git", RepoRoot:"https://gopkg.in/ini.v1"} at https://gopkg.in/ini.v1?go-get=1
get "gopkg.in/resty.v1": found meta tag get.metaImport{Prefix:"gopkg.in/resty.v1", VCS:"git", RepoRoot:"https://gopkg.in/resty.v1"} at https://gopkg.in/resty.v1?go-get=1
get "gopkg.in/go-playground/assert.v1": found meta tag get.metaImport{Prefix:"gopkg.in/go-playground/assert.v1", VCS:"git", RepoRoot:"https://gopkg.in/go-playground/assert.v1"} at https://gopkg.in/go-playground/assert.v1?go-get=1
get "gopkg.in/h2non/gock.v1": found meta tag get.metaImport{Prefix:"gopkg.in/h2non/gock.v1", VCS:"git", RepoRoot:"https://gopkg.in/h2non/gock.v1"} at https://gopkg.in/h2non/gock.v1?go-get=1
go: finding gopkg.in/ini.v1 v1.44.0
go: finding gopkg.in/resty.v1 v1.9.1
go: finding gopkg.in/ini.v1 v1.42.0
go: finding gopkg.in/go-playground/assert.v1 v1.2.1
go: finding gopkg.in/h2non/gock.v1 v1.0.15
go: gopkg.in/h2non/gock.v1@v1.0.15: unknown revision v1.0.15
go: gopkg.in/go-playground/assert.v1@v1.2.1: unknown revision v1.2.1
go: gopkg.in/resty.v1@v1.9.1: unknown revision v1.9.1
go: gopkg.in/ini.v1@v1.42.0: unknown revision v1.42.0
go: gopkg.in/ini.v1@v1.44.0: unknown revision v1.44.0
go: error loading module requirements
@golang golang deleted a comment Jun 10, 2020
@bcmills
Copy link
Contributor

bcmills commented Jun 10, 2020

Per the Go project's release policy, go 1.12.7 has been unsupported since 2020-02-25 (when go 1.14 was released), and we have added workarounds for a number of git client bugs since 1.12.7.

Please try go1.14.4 (the current release) and let us know if this issue is still reproducible, and if so with which git client version.

@bcmills bcmills added modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Jun 10, 2020
@bcmills bcmills added this to the Unplanned milestone Jun 10, 2020
@leguminosa
Copy link
Author

leguminosa commented Jun 11, 2020

yes I installed gvm yesterday shortly after creating this ticket,

$ gvm list

gvm gos (installed)

=> go1.13
   system

and then go mod tidy -v succeed.

And I ran those commands from my (zsh) terminal outside vscode.

Then I had problem when doing things from vscode terminal / tools (run go mod tidy -v, automated coverage test on save, problems tab) and when I check go version, go env from vscode terminal, it still shows 1.12.7 and old GOPATH (as opposed to new one by gvm)

What is the solution for those so that my vscode is aligned with the gvm ?

Then I also found gvm extension on vscode, I installed it, set the go to 1.13 like I did before, and finally the go version on vscode matches with the terminal outside vscode.

Is "downloading gvm extension on vscode" really is the proper solution I asked earlier?

@bcmills
Copy link
Contributor

bcmills commented Jun 11, 2020

I have no idea about gvm or how it works. Generally extensions like vscode should use whichever go command is first in $PATH, so you might check what PATH you're running vscode with. (If you're starting vscode using a GUI, typically that environment is set in your .profile script rather than .zshrc, and you'll need to log out and back in to pick up changes.)

@bcmills bcmills added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Jun 11, 2020
@leguminosa
Copy link
Author

leguminosa commented Jun 12, 2020

well...since I have used the gvm ext inside the vscode, ofc now the $PATH or anything has already been pointing to the right spot (go version I chose via gvm)...so in a nutshell this problem is solved.

Anyway thank you for your assistance and pointing out the root cause (outdated go version) of the original problem. Have a good day.

@golang golang locked and limited conversation to collaborators Jun 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants