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: GONOPROXY is undocumented #32056

Open
bcmills opened this issue May 15, 2019 · 8 comments

Comments

Projects
None yet
4 participants
@bcmills
Copy link
Member

commented May 15, 2019

GOSUMDB, GONOSUMDB, and GONOPROXY variables were added in CL 173951.

Documentation for GOSUMDB and GONOSUMDB was added to https://tip.golang.org/cmd/go/#hdr-Module_authentication_failures, but I don't see any mention of GONOPROXY in the cmd/go docs at all.

CC @jayconrod @rsc

@bcmills

This comment has been minimized.

Copy link
Member Author

commented May 15, 2019

Some specific questions:

  • Should GOPROXY=off with GONOPROXY=*/x disable all fetches, or allow (only) */x to be fetched directly?
  • What should happen if GOPROXY includes off explicitly in the fallback chain, such as GOPROXY=https://my.proxy,https://other.proxy,off? (In that case, should fetches of the GONOPROXY paths be disabled?)
@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented May 15, 2019

Also note that all environment variables should be documented at https://golang.org/cmd/go/#hdr-Environment_variables. These new variables are not mentioned there.

@bcmills

This comment has been minimized.

Copy link
Member Author

commented May 15, 2019

One more question to document:

  • If GOPROXY does not include direct as a fallback, should GONOPROXY fall back to direct implicitly, or behave as if GOPROXY were set to off for that module?
@rogpeppe

This comment has been minimized.

Copy link
Contributor

commented May 16, 2019

I find it a bit odd that GONOPROXY is using sh-style globs anyway, given that GONOPROXY holds a set of package paths (AIUI) not URLs, and package paths are almost always matched with patterns as documented in go help packages.

That is, I'd expect:

GONOPROXY=myorg.com/...

to avoid the proxy for all modules under myorg.com.

@rsc

This comment has been minimized.

Copy link
Contributor

commented May 16, 2019

If GOPROXY=off and GONOPROXY=* (say), then I think GONOPROXY wins. No matter what GOPROXY is set to, GONOPROXY matching the module means don't pay attention to that.

@rsc

This comment has been minimized.

Copy link
Contributor

commented May 16, 2019

@rogpeppe, I see your point but I was trying to line up a bit with the standard NO_PROXY (for example https://www.gnu.org/software/emacs/manual/html_node/url/Proxies.html). Also I think it would be just too hard to write something like GONOPROXY=*.corp.yourcompany.com using ... (its not actually possible at all).

@rogpeppe

This comment has been minimized.

Copy link
Contributor

commented May 17, 2019

I guess I don't understand the GONOPROXY semantics (the whole point of this thread, and probably why I can't get it to work for me); how is GONOPROXY=*.corp.yourcompany.com different from GONOPROXY=....corp.yourcompany.com ?

@bcmills

This comment has been minimized.

Copy link
Member Author

commented May 20, 2019

how is GONOPROXY=*.corp.yourcompany.com different from GONOPROXY=....corp.yourcompany.com ?

The have different behavior for packages such as contrived.example.com/not.your.corp.yourcompany.com.

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.