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: Unable to vendor major versions > 2 #23977

Closed
while-loop opened this issue Feb 21, 2018 · 2 comments

Comments

@while-loop
Copy link

commented Feb 21, 2018

It seems that there is static checking for semver major versions of v1 and v2. When I try to vendor
my deps, I get an error about my version.

The initial vgo get downloads the dep successfully and writes to go.mod, but any subsequent vgo get or vgo vendor command fails.

What did you do?

vgo get github.com/google/go-github@v15.0.0
vgo vendor

What did you expect to see?

vgo: extracting github.com/google/go-github v15.0.0
vgo: import "github.com/google/go-github" [/home/anthony/go/src/v/github.com/google/go-github@v15.0.0]: no Go source files

What did you see instead?

/home/anthony/go/src/github.com/while-loop/github-test/go.mod:3: invalid module: github.com/google/go-github should be v1, not v15 (v15.0.0)

System details

go version go1.10 linux/amd64 vgo:2018-02-20.1
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/anthony/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/anthony/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build957854756=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version go1.10 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.10
uname -sr: Linux 4.13.0-26-generic
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.3 LTS
Release:	16.04
Codename:	xenial
/lib/x86_64-linux-gnu/libc.so.6: GNU C Library (Ubuntu GLIBC 2.23-0ubuntu10) stable release version 2.23, by Roland McGrath et al.
gdb --version: GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1

@gopherbot gopherbot added this to the Unreleased milestone Feb 21, 2018

@bradfitz bradfitz modified the milestones: Unreleased, vgo Feb 21, 2018

@gopherbot

This comment has been minimized.

Copy link

commented Feb 21, 2018

Change https://golang.org/cl/95700 mentions this issue: cmd/go/internal/modfile: fix dependency major versions

@tgulacsi

This comment has been minimized.

Copy link

commented Feb 24, 2018

What if you append the /v15 to the import path in go.mod?

@while-loop while-loop closed this Mar 28, 2018

@golang golang locked and limited conversation to collaborators Mar 28, 2019

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