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

cmd/go: clarify -getmode=local #26370

Closed
bcmills opened this issue Jul 13, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@bcmills
Copy link
Member

commented Jul 13, 2018

Currently, the -getmode flag supports three values: vendor, local, and the empty string.
-getmode=vendor is documented in the output of go help modules, but -getmode=local is not.

I'm trying to remember exactly what it does. I had thought that it restricted imports and go get to the contents of the local module cache, but this snippet in modload.Import seems to imply that it is further restricted to the active modules in the build list (even if other modules or versions are available in cache).

We should document the intended behavior of -getmode=local, and probably add some more tests to verify what happens for imports from cached-but-inactive modules.

(CC: @rsc)

@bcmills bcmills added the modules label Jul 13, 2018

@bcmills bcmills added this to the Go1.11 milestone Jul 13, 2018

@bcmills bcmills added the NeedsFix label Jul 16, 2018

@nightlyone

This comment has been minimized.

Copy link
Contributor

commented Jul 20, 2018

I would even go as far as disabling this mode as a valid parameter for the release unless it is well defined again, what it does. It is such a good name.

@gopherbot

This comment has been minimized.

Copy link

commented Jul 30, 2018

Change https://golang.org/cl/126696 mentions this issue: cmd/go: replace -getmode with -mod, $GOPROXY

@gopherbot gopherbot closed this in 30a84b3 Aug 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.