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: ignoring version from go.mod #24560

Closed
lelvisl opened this issue Mar 27, 2018 · 2 comments
Closed

x/vgo: ignoring version from go.mod #24560

lelvisl opened this issue Mar 27, 2018 · 2 comments
Milestone

Comments

@lelvisl
Copy link

lelvisl commented Mar 27, 2018

Please answer these questions before submitting your issue. Thanks!

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

go version go1.10 darwin/amd64

Does this issue reproduce with the latest release?

yes

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/elvis/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/elvis/prog/go"
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/wp/jlm6rvd11p35vsctx0czjxm80000gn/T/go-build585447605=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

I try to vgo get github.com/lelvisl/logger

What did you expect to see?

get logrus-logstash-hook version from go.mod version in github.com/lelvisl/logger

What did you see instead?

vgo get github.com/lelvisl/logger
vgo: extracting github.com/bshuster-repo/logrus-logstash-hook v0.4.1
# github.com/lelvisl/logger
../../../../v/github.com/lelvisl/logger@v0.0.2/logstash.go:17:10: undefined: logrustash.New
../../../../v/github.com/lelvisl/logger@v0.0.2/logstash.go:17:31: undefined: logrustash.DefaultFormatter
@gopherbot gopherbot added this to the vgo milestone Mar 27, 2018
@rsc
Copy link
Contributor

rsc commented Mar 27, 2018

At least right now, "vgo get x" means "get me the latest x and update go.mod".
If you want to get a specific version, you can use "vgo get x@v0.4.1" or put it into the go.mod manually.
If you want to just build the version from go.mod, use "vgo build x" (not "get").

@rsc rsc closed this as completed Mar 27, 2018
@lelvisl
Copy link
Author

lelvisl commented Mar 27, 2018

@rsc, you misunderstood me.

In github.com/lelvisl/logger I have go.mod with line for this dependency:

"github.com/bshuster-repo/logrus-logstash-hook" v0.0.0-20180322175230-ea59b04518367f2aafe8cf6d46a7d60605d075ce

https://github.com/lelvisl/logger/blob/f9d5eba6f2402e86e54584c9f9ce6e10d39bfad9/go.mod#L4

And, when I vgo get project, I expect this version of logrus-logstash-hook, no v0.4.1.

@golang golang locked and limited conversation to collaborators Mar 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants