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 build/install default binary name for module versions >=2 #26047

Closed
mwf opened this issue Jun 25, 2018 · 2 comments
Closed

x/vgo: vgo build/install default binary name for module versions >=2 #26047

mwf opened this issue Jun 25, 2018 · 2 comments
Milestone

Comments

@mwf
Copy link

mwf commented Jun 25, 2018

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

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

Latest vgo:

commit 0f3e556044ecbd8a0805d098e52a743a1d0e3566 (HEAD -> master, origin/master, origin/HEAD)
Author: Tim Cooper <tim.cooper@layeh.com>
Date:   Fri Jun 22 17:51:20 2018 -0300

    cmd/go/internal/modcmd: fix sorting

What did you do?

Please refer to https://github.com/mwf/goplay/tree/master/vgo/hello_world

The same case as in #26046, a binary with major version 2.0.0.

go.mod:

module github.com/mwf/goplay/vgo/hello_world/v2

cd to hello_world module directory

What did you expect to see?

vgo build . should produce binary named hello_world, as it should correspond with actual module name instead of the version.

What did you see instead?

vgo build . produces binary named v2

The same thing if you use vgo install:

$ vgo install github.com/mwf/goplay/vgo/hello_world
vgo: resolving import "github.com/mwf/goplay/vgo/hello_world"
vgo: finding github.com/mwf/goplay/vgo/hello_world (latest)
vgo: adding github.com/mwf/goplay/vgo/hello_world v1.0.1

$ ls -al $GOPATH/bin
-rwxr-xr-x   1 ikorolev  staff   2093408 Jun 25 18:51 hello_world@v1.0.1

Compare to v2 installation:

$ vgo install github.com/mwf/goplay/vgo/hello_world/v2
vgo: resolving import "github.com/mwf/goplay/vgo/hello_world/v2"
vgo: finding github.com/mwf/goplay/vgo/hello_world/v2 v2.0.0
vgo: finding github.com/mwf/goplay/vgo/hello_world/v2 (latest)
vgo: adding github.com/mwf/goplay/vgo/hello_world/v2 v2.0.0
vgo: downloading github.com/mwf/goplay/vgo/hello_world/v2 v2.0.0

$ ls -al $GOPATH/bin
-rwxr-xr-x   1 ikorolev  staff   2093408 Jun 25 18:55 v2@v2.0.0
@gopherbot gopherbot added this to the vgo milestone Jun 25, 2018
@oiooj
Copy link
Member

oiooj commented Jun 25, 2018

duplicate of #24667

@mwf
Copy link
Author

mwf commented Jun 25, 2018

Thanks @oiooj, didn't manage to find it :)

Closing this issue.

@mwf mwf closed this as completed Jun 25, 2018
@golang golang locked and limited conversation to collaborators Jun 25, 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