-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: exclude $GOPATH/src/mod from “all” and “...” patterns in GOPATH mode #26401
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Yes, mod should just be invisible in GOPATH/src. That's in internal/search I think. |
We could plausibly backport the GOPATH/src/mod exclusion to Go 1.9 and Go 1.10 as well. |
Change https://golang.org/cl/125675 mentions this issue: |
Any reason this stuff can't go in $GOPATH/mod or something other than $GOPATH/src? I posted to golang-dev just now on this. |
That would create a $HOME/mod directory for those who set $GOPATH=$HOME.
As a counter proposal, why not make it $GOPATH/src/.mod then the usual
exclusion rules apply.
…On 25 July 2018 at 18:22, Matt Joiner ***@***.***> wrote:
Any reason this stuff can't go in $GOPATH/mod or something other than
$GOPATH/src? I posted to golang-dev just now on this.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#26401 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAcA1ikp9Lxen1AA5pnVWR65JKRxM3Wks5uKCq7gaJpZM4VRc52>
.
|
How do those people setting $GOPATH=$HOME rationalize pkg? .mod seems good if the existing tools work with that. |
I mostly close my eyes and pretend it isn't there. (And soon it won't be! See #4719.) |
Regarding the CL: It would be nice if "mod" was a constant somewhere. Similarly for its use elsewhere in the code base. |
On hold pending a decision on whether to move the module cache someplace where it would be ignored by default (outside of |
Change https://golang.org/cl/126755 mentions this issue: |
After performing a
go build
in module mode,go build all
in GOPATH mode emits a bunch of errors due to import path mismatches in$GOPATH/src/mod
.Since the code in
$GOPATH/src/mod
isn't intended to be buildable in GOPATH mode in the first place, we should explicitly ignore it.(CC: @rsc)
The text was updated successfully, but these errors were encountered: