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: define and implement "vgo get" (with no args) #24105

Closed
pierreprinetti opened this issue Feb 24, 2018 · 4 comments
Closed

x/vgo: define and implement "vgo get" (with no args) #24105

pierreprinetti opened this issue Feb 24, 2018 · 4 comments
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@pierreprinetti
Copy link
Contributor

pierreprinetti commented Feb 24, 2018

What did you do?

cd $my_go_module
vgo get

What did you expect to see?

All the dependencies listed in the go.mod file ready for the next build.

What did you see instead?

> vgo get
vgo get: need arguments or -u

System details

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/pierre/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/pierre/code"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.10/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.10/libexec/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/1_/m_98m3w13zddr8ph_1d6lhb40000gp/T/go-build605510730=/tmp/go-build -gno-record-gcc-switches -fno-common"
VGOMODROOT=""

why do I need vgo get

My workflow contemplates frequent Docker builds. In my Dockerfile, I want to be able to fetch the project dependencies in a step before copying (and building) my actual code from the host, so that Docker can cache the dependency-fetching layer and reuse it if I change the code of my module.

@gopherbot gopherbot added this to the vgo milestone Feb 24, 2018
@owais
Copy link

owais commented Mar 7, 2018

It would be great to have a command that just resolves imports/requires and downloads the dependencies. This is very useful for CI systems that often download package first, cache them and then move on to running tests. With current design, a CI system will not be able to cache dependencies until the tests pass.

So it would be great for vgo get or a new command to just download/cache all dependencies and exit.

@rsc
Copy link
Contributor

rsc commented Mar 30, 2018

Yes, we need to figure out what this means exactly.

@rsc rsc added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Mar 30, 2018
@rsc rsc changed the title x/vgo: missing "get" subcommand without arguments x/vgo: define and implement "vgo get" (with no args) Mar 30, 2018
@NobbZ
Copy link

NobbZ commented Apr 4, 2018

This seems to be similar what go get ./... does, isn't it?

At least vgo get ./... was my first try to prefetch dependencies (I did it before vgo using the above construct), but it fails with the following:

FindRepo: Get https://./...?go-get=1: dial tcp: lookup .: No address associated with hostname
vgo get ./...: Get https://./...?go-get=1: dial tcp: lookup .: No address associated with hostname

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/122396 mentions this issue: cmd/go/internal/get: complete implementation

@golang golang locked and limited conversation to collaborators Jul 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

5 participants