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: get fails if there are no go files at the module root #24008

Closed
zombiezen opened this issue Feb 21, 2018 · 2 comments

Comments

@zombiezen
Copy link
Contributor

commented Feb 21, 2018

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

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

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/light/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/light"
GORACE=""
GOROOT="/Users/light/go"
GOTMPDIR=""
GOTOOLDIR="/Users/light/go/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/4p/yyp29g691d17jrvrwq2gzxxr004_bp/T/go-build301961857=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

$ mkdir foo
$ cd foo
$ echo 'module "myroot"' > go.mod
$ vgo get github.com/googleapis/gax-go
vgo: import "myroot" [/Users/light/foo]: no Go source files

What did you expect to see?

vgo to exit successfully, with the following content in go.mod:

module "myroot"

require "github.com/googleapis/gax-go" v2.0.0

What did you see instead?

vgo exits with failure and has the following content in go.mod:

module "myroot"

@gopherbot gopherbot added this to the vgo milestone Feb 21, 2018

@rsc rsc added the NeedsDecision label Apr 2, 2018

@rsc

This comment has been minimized.

Copy link
Contributor

commented Apr 2, 2018

Related to #24105.

@gopherbot

This comment has been minimized.

Copy link

commented Jun 26, 2018

Change https://golang.org/cl/120995 mentions this issue: cmd/go/internal/vgo: allow vgo get of module with no package in root

@golang golang locked and limited conversation to collaborators Jun 29, 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.