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: go list should avoid downloads when possible #24066

Closed
rogpeppe opened this issue Feb 23, 2018 · 3 comments

Comments

@rogpeppe
Copy link
Contributor

commented Feb 23, 2018

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

go version devel +104445e Wed Feb 7 19:22:09 2018 +0000 linux/amd64 vgo:2018-02-20.1

What did you do?

vgo list ./...

What did you expect to see?

I expected it to list the packages under the current path.
I would expect this to happen without any need to update or resolve dependencies.

What did you see instead?

It started to resolve imports by fetching dependencies.

% vgo list ./...
vgo: finding gopkg.in/tomb.v2 v0.0.0-20161208151619-d5d1b5820637
vgo: finding gopkg.in/retry.v1 v0.0.0-20180116153415-2d7c7c65cc71
... etc

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

@rogpeppe rogpeppe changed the title x/vgo: list command downloads x/vgo: list command fetches dependencies Feb 23, 2018

@rsc rsc changed the title x/vgo: list command fetches dependencies x/vgo: list command resolves dependencies Mar 30, 2018

@rsc rsc changed the title x/vgo: list command resolves dependencies x/vgo: go list should avoid downloads when possible Mar 30, 2018

@rsc rsc added the NeedsDecision label Apr 9, 2018

@rsc

This comment has been minimized.

Copy link
Contributor

commented Apr 9, 2018

Brad asked me to kill uses of NeedsFixButNotYet, so I'm going to call this NeedsDecision.

@rsc rsc removed the NeedsFixButNotYet label Apr 9, 2018

@myitcv

This comment has been minimized.

Copy link
Member

commented Apr 10, 2018

This is somewhat related to #24749 (just updated that issue with a standalone example) - although I think there's another issue at play there on top of the behaviour being discussed in this issue.

Having had a go at an implementation for #24661, my gut feeling is that vgo list should not download by default. Not because of anything per se in #24661 (although that command, if implemented, should never download), but just a gut feel. Therefore vgo list and whatever is done for #24661 will need to indicate that their output is incomplete; with DepsErrors as appropriate.

That said, I think vgo list should gain a -download-esque flag that will ensure all dependencies listed in go.mod files encountered are present, even binary dependencies.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Jul 5, 2018

Having used this for a while, I think list downloading is the right default, both for list and for all the other go commands. That said, if you want to turn off downloading in the list command (or any other command that takes build flags), use -getmode=local.

@rsc rsc closed this Jul 5, 2018

@golang golang locked and limited conversation to collaborators Jul 5, 2019

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