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

x/vgo: vgo mod -verify fails because it checks non-existent cache directory #26151

Closed
jaloren opened this issue Jun 29, 2018 · 5 comments

Comments

@jaloren
Copy link

commented Jun 29, 2018

Please answer these questions before submitting your issue. Thanks!

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

go version go1.10.3 darwin/amd64 vgo:2018-02-20.1

Does this issue reproduce with the latest release?

Yes, I built from source today.

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

GOARCH="amd64"
GOBIN="/Volumes/Repositories/go/bin"
GOCACHE="/Users/jlorenzini/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Volumes/Repositories/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
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/8w/7ndx_j6s36x9hm9dns67j21s3hynqn/T/go-build961467438=/tmp/go-build -gno-record-gcc-switches -fno-common"
VGOMODROOT="/Users/jlorenzini/repos/operator"

What did you do?

vgo build $PKG_NAME
vgo mod -verify

What did you expect to see?

The verify operation should succeed.

What did you see instead?

The verify operation fails with the error.

gopkg.in/yaml.v2 v2.2.1: missing ziphash: open /Volumes/Repositories/go/src/mod/cache/gopkg.in/yaml.v2/@v/v2.2.1.ziphash: no such file or directory

The issue is that source cache is stored in a downloads directory. So for example this directory does exist.

/Volumes/Repositories/go/src/mod/cache/download/gopkg.in/yaml.v2/@v/v2.2.1.ziphash

@bcmills

This comment has been minimized.

Copy link
Member

commented Jun 29, 2018

Should be fixed by https://golang.org/cl/121659.

Please reopen if you can still reproduce this problem with a vgo built from commit 0e237a44ca5947b2341c0bf9d0b515f80808a832 or later.

@bcmills bcmills closed this Jun 29, 2018

@jaloren jaloren changed the title vgo mod -verify fails because it checks non-existent cache directory x/vgo: vgo mod -verify fails because it checks non-existent cache directory Jul 2, 2018

@jaloren

This comment has been minimized.

Copy link
Author

commented Jul 2, 2018

@bcmills i am seeing this issue even after that commit. I am on commit:

47daa39e820cb74d4206b6cd6c3a8f97a2f86086

@jaloren

This comment has been minimized.

Copy link
Author

commented Jul 2, 2018

@bcmills I don't see a way to reopen the issue.

@bcmills bcmills reopened this Jul 2, 2018

@gopherbot gopherbot added this to the vgo milestone Jul 2, 2018

@bcmills

This comment has been minimized.

Copy link
Member

commented Jul 2, 2018

Concrete steps to reproduce:

$ export GOPATH=$(mktemp -d)
$ vgo mod -init -module "github.com/golang/go/issues/26151"
vgo: creating new go.mod: module github.com/golang/go/issues/26151

$ mkdir somepkg
$ cat > somepkg/import.go
package somepkg

import _ "gopkg.in/yaml.v2"

$ vgo build ./somepkg
vgo: resolving import "gopkg.in/yaml.v2"
vgo: finding gopkg.in/yaml.v2 v2.2.1
vgo: finding gopkg.in/yaml.v2 (latest)
vgo: adding gopkg.in/yaml.v2 v2.2.1
vgo: finding gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
vgo: downloading gopkg.in/yaml.v2 v2.2.1


$ vgo mod -verify
gopkg.in/yaml.v2 v2.2.1: missing ziphash: open /tmp/tmp.70vKRxR0cS/src/mod/cache/gopkg.in/yaml.v2/@v/v2.2.1.ziphash: no such file or directory

$ find $GOPATH -name '*.ziphash'
/tmp/tmp.70vKRxR0cS/src/mod/cache/download/gopkg.in/yaml.v2/@v/v2.2.1.ziphash

Note the missing download/ path component in the vgo mod -verify output.

@bcmills bcmills added NeedsFix and removed NeedsInvestigation labels Jul 2, 2018

@gopherbot

This comment has been minimized.

Copy link

commented Jul 2, 2018

Change https://golang.org/cl/121975 mentions this issue: cmd/go/internal/modcmd: use the correct path in verifyMod

@golang golang locked and limited conversation to collaborators Jul 2, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.