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 list creates go.mod files #24637

Closed
myitcv opened this issue Apr 2, 2018 · 2 comments

Comments

@myitcv
Copy link
Member

commented Apr 2, 2018

Please answer these questions before submitting your issue. Thanks!

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

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

Does this issue reproduce with the latest release?

Yes, per above.

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/myitcv/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/myitcv/gostuff"
GORACE=""
GOROOT="/home/myitcv/gos"
GOTMPDIR=""
GOTOOLDIR="/home/myitcv/gos/pkg/tool/linux_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=/tmp/go-build767998392=/tmp/go-build -gno-record-gcc-switches"
VGOMODROOT=""

What did you do?

At the time of writing, myitcv.io/immutable has not been converted to be vgo aware:

cd `mktemp -d`
export GOPATH=$PWD
git clone https://github.com/myitcv/immutable src/myitcv.io/immutable
cd src/myitcv.io/immutable
git reset --hard 14699aec0b605e3fe63944cf91b39d2cebda03dd
vgo list ./...

in addition to creating a go.mod file in the repo root.

What did you see?

Got the output:

vgo: resolving import "myitcv.io/gogenerate"
vgo: finding myitcv.io/gogenerate (latest)
vgo: adding myitcv.io/gogenerate v0.0.0-20170415175604-bd69a94c9695
vgo: resolving import "golang.org/x/tools/go/types/typeutil"
vgo: finding golang.org/x/tools (latest)
vgo: adding golang.org/x/tools v0.0.0-20180401165715-ac136b6c2db7
vgo: resolving import "github.com/kisielk/gotool"
vgo: finding github.com/kisielk/gotool (latest)
vgo: adding github.com/kisielk/gotool v1.0.0
vgo: finding github.com/kisielk/gotool v1.0.0
vgo: finding golang.org/x/tools v0.0.0-20180401165715-ac136b6c2db7
vgo: finding myitcv.io/gogenerate v0.0.0-20170415175604-bd69a94c9695
vgo: downloading myitcv.io/gogenerate v0.0.0-20170415175604-bd69a94c9695
vgo: downloading golang.org/x/tools v0.0.0-20180401165715-ac136b6c2db7
vgo: downloading github.com/kisielk/gotool v1.0.0
myitcv.io/immutable
myitcv.io/immutable/cmd/immutableGen
myitcv.io/immutable/cmd/immutableGen/internal/coretest
myitcv.io/immutable/cmd/immutableVet
myitcv.io/immutable/example
myitcv.io/immutable/util

What did you expect to see?

myitcv.io/immutable
myitcv.io/immutable/cmd/immutableGen
myitcv.io/immutable/cmd/immutableGen/internal/coretest
myitcv.io/immutable/cmd/immutableVet
myitcv.io/immutable/example
myitcv.io/immutable/util

I was expecting just the regular go list behaviour here because there is no go.mod (for now).

Or have I got that wrong?

@gopherbot gopherbot added this to the vgo milestone Apr 2, 2018

@rsc

This comment has been minimized.

Copy link
Contributor

commented Apr 2, 2018

Sorry - you've got that wrong. The eventual go command integration will adjust (at least during a transition period) based on whether go.mod is present to decide if it's in "versioned mode" or not. But vgo, being named vgo, is always in versioned mode.

@rsc rsc closed this Apr 2, 2018

@myitcv

This comment has been minimized.

Copy link
Member Author

commented Apr 2, 2018

The eventual go command integration will adjust (at least during a transition period) based on whether go.mod is present to decide if it's in "versioned mode" or not. But vgo, being named vgo, is always in versioned mode.

👍 - thanks for clarifying.

@golang golang locked and limited conversation to collaborators Apr 2, 2019

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