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: not versioning non-go-source resources #26244

Closed
keynan opened this issue Jul 6, 2018 · 3 comments

Comments

Projects
None yet
6 participants
@keynan
Copy link

commented Jul 6, 2018

Please answer these questions before submitting your issue. Thanks!

What did you do?

vgo get github.com/antlr/grammars-v4
vgo vendor

What did you expect to see?

a vendor directory containing the grammars

What did you see instead?

no vendor dir (no other dependencies yet)

Does this issue reproduce with the latest release (go1.10.3)?

Unknown

System details

go version go1.10.2 linux/amd64
GOARCH="amd64"
GOBIN="/home/kpratt/go/bin"
GOCACHE="/home/kpratt/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/kpratt/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/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-build411131786=/tmp/go-build -gno-record-gcc-switches"
VGOMODROOT="/home/kpratt"
GOROOT/bin/go version: go version go1.10.2 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.10.2
uname -sr: Linux 4.16.12-1-ARCH
/usr/lib/libc.so.6: GNU C Library (GNU libc) stable release version 2.27.
gdb --version: GNU gdb (GDB) 8.1

@mdlayher mdlayher changed the title Not versioning non-go-source resources x/go: not versioning non-go-source resources Jul 6, 2018

@gopherbot gopherbot added this to the Unreleased milestone Jul 6, 2018

@mdlayher mdlayher changed the title x/go: not versioning non-go-source resources x/vgo: not versioning non-go-source resources Jul 6, 2018

@jaloren

This comment has been minimized.

Copy link

commented Jul 6, 2018

@mdlayher its a bit unclear from your title what exactly the issue is. But if you are expecting to be able to have vgo pull down go packages and put them in your vendor directory, then you need to execute this command:

vgo mod -vendor
@mdlayher

This comment has been minimized.

Copy link
Member

commented Jul 6, 2018

I'm not the issue author; I just added the vgo tag.

@FiloSottile FiloSottile modified the milestones: Unreleased, Go1.11 Jul 13, 2018

@FiloSottile FiloSottile added the modules label Jul 13, 2018

@FiloSottile FiloSottile changed the title x/vgo: not versioning non-go-source resources cmd/go: not versioning non-go-source resources Jul 13, 2018

@rsc

This comment has been minimized.

Copy link
Contributor

commented Jul 13, 2018

vgo vendor (now vgo mod -vendor or go mod -vendor) does not copy entire repositories. By design, it copies only the directories needed to satisfy imports in builds of the top-level module. If your module is not importing github.com/antlr/grammars-v4 then that directory will not be copied. And if there are directories with only non-Go files, there is no way to copy those directories into vendor. That's not what vendor is for. Vendor is only about preserving the code needed to build the main module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.