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: module mode does not let ... match GOROOT/src/cmd/* #26924

Open
rsc opened this Issue Aug 10, 2018 · 3 comments

Comments

Projects
None yet
4 participants
@rsc
Contributor

rsc commented Aug 10, 2018

GOROOT/src/cmd's use of a nested vendor directory makes it not work with module mode.
We'll have to fix that at some point.

@rsc rsc added this to the Go1.12 milestone Aug 10, 2018

@myitcv

This comment has been minimized.

Member

myitcv commented Aug 10, 2018

Does this also apply to the top-level src/vendor directory?

export GOPATH=$(mktemp -d)
cd $(mktemp -d)
mkdir hello
cd hello
go mod init example.com/hello
go test vendor/golang_org/x/net/http/httpproxy

results in:

# vendor/golang_org/x/net/http/httpproxy_test [vendor/golang_org/x/net/http/httpproxy.test]
/home/myitcv/gos/src/vendor/golang_org/x/net/http/httpproxy/proxy_test.go:304:6: undefined: httpproxy.ExportUseProxy
/home/myitcv/gos/src/vendor/golang_org/x/net/http/httpproxy/proxy_test.go:314:8: undefined: httpproxy.ExportUseProxy
/home/myitcv/gos/src/vendor/golang_org/x/net/http/httpproxy/proxy_test.go:325:6: undefined: httpproxy.ExportUseProxy
FAIL    vendor/golang_org/x/net/http/httpproxy [build failed]

Or would you prefer this as a separate issue?

@agnivade agnivade added the modules label Aug 11, 2018

@rsc

This comment has been minimized.

Contributor

rsc commented Aug 18, 2018

It's basically the same. It can be this issue too.

@bcmills

This comment has been minimized.

Member

bcmills commented Sep 6, 2018

Hmm, this might be the same underlying cause as the failure @cespare observed in #26996 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment