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 get -u fails if the current directory contains no Go files #24486

Closed
eliasnaur opened this issue Mar 22, 2018 · 2 comments
Closed
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@eliasnaur
Copy link
Contributor

$ mkdir vgoempty
$ cd vgoempty
$ cat > go.mod 
module "vgoempty"

require (
	"github.com/BurntSushi/xgb" v0.0.0-20160522160000-3abbe7f74b5f
)
$ vgo get -u
vgo: finding github.com/BurntSushi/xgb latest
vgo: import "testmod" [/home/elias/vgoempty]: no Go source files
$ cat go.mod
module "testmod"

require (
	"github.com/BurntSushi/xgb" v0.0.0-20160522160000-3abbe7f74b5f
)

I had expected no error about missing Go source files, and that the dependency was updated. If I add a dummy file, the dependency is updated as expected:

$ cat > blah.go
package vgoempty
$ vgo get -u
vgo: finding github.com/BurntSushi/xgb latest
$ cat go.mod
module "vgoempty"

require (
	"github.com/BurntSushi/xgb" v0.0.0-20160522181843-27f122750802
)
@eliasnaur eliasnaur added this to the vgo milestone Mar 22, 2018
@rsc
Copy link
Contributor

rsc commented Mar 30, 2018

The overloading of get to mean "operate on the current module", "fetch a module", and "build a package" is unfortunate. We need to design this a bit better. Known issue, but I'll leave this open to track.

@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
@gopherbot
Copy link

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

3 participants