-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: change default of GO111MODULE from 'auto' to 'on' #30228
Comments
CC @rsc @jayconrod We will want to do #29433 in conjunction with this change. Otherwise it's way too easy to accidentally create a |
A slight wrinkle: some of the tests in Some options:
|
Change https://golang.org/cl/162697 mentions this issue: |
Change https://golang.org/cl/162698 mentions this issue: |
Change https://golang.org/cl/162699 mentions this issue: |
Blocked on #26924. Let's shave this yak! 🐃 |
I talked with @rsc, and our plan for |
Change https://golang.org/cl/162837 mentions this issue: |
In the general case, we do not know the correct module path for a new module unless we have checked its VCS tags for a major version. If we do not know the correct path, then we should not synthesize a go.mod file automatically from it. On the other hand, we don't want to run VCS commands in the working directory without an explicit request by the user to do so: 'go mod init' can reasonably invoke a VCS command, but 'go build' should not. Therefore, we should only create a go.mod file during 'go mod init'. This change removes the previous behavior of synthesizing a file automatically, and instead suggests a command that the user can opt to run explicitly. Updates #29433 Updates #27009 Updates #30228 Change-Id: I8c4554969db17156e97428df220b129a4d361040 Reviewed-on: https://go-review.googlesource.com/c/162699 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
In the general case, we do not know the correct module path for a new module unless we have checked its VCS tags for a major version. If we do not know the correct path, then we should not synthesize a go.mod file automatically from it. On the other hand, we don't want to run VCS commands in the working directory without an explicit request by the user to do so: 'go mod init' can reasonably invoke a VCS command, but 'go build' should not. Therefore, we should only create a go.mod file during 'go mod init'. This change removes the previous behavior of synthesizing a file automatically, and instead suggests a command that the user can opt to run explicitly. Updates golang#29433 Updates golang#27009 Updates golang#30228 Change-Id: I8c4554969db17156e97428df220b129a4d361040 Reviewed-on: https://go-review.googlesource.com/c/162699 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
Change https://golang.org/cl/162833 mentions this issue: |
Change https://golang.org/cl/162832 mentions this issue: |
Change https://golang.org/cl/162831 mentions this issue: |
Change https://golang.org/cl/162830 mentions this issue: |
We will soon switch GO111MODULE to 'on' by default, and when that happens these tests will otherwise break. Updates #30228 Change-Id: I1016d429b1dfb889d1aae8bc86fb2567cf0fc56f Reviewed-on: https://go-review.googlesource.com/c/162697 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
In module mode, building the current directory requires a go.mod file (in order to determine the import path of the package). Change the tests to pass explicit file arguments instead, since those can be built in module mode without defining a module. Updates #30228 Change-Id: I680c658d1f79645f73ad4d1e88189ea50a4852e9 Reviewed-on: https://go-review.googlesource.com/c/162837 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Change https://golang.org/cl/163038 mentions this issue: |
Change https://golang.org/cl/162835 mentions this issue: |
Change https://golang.org/cl/162836 mentions this issue: |
Updates #30228 Change-Id: I6a38269f322d906702921b3879ff48c8a96ab511 Reviewed-on: https://go-review.googlesource.com/c/162831 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Updates #30228 Change-Id: I3c7864e6725312df5ec978cdc130ccfe8fc2e738 Reviewed-on: https://go-review.googlesource.com/c/162836 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Updates #30228 Change-Id: I8dd4a1f94dfd3be324a4f213941a20fa1b8b1215 Reviewed-on: https://go-review.googlesource.com/c/162832 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
Updates #30228 Change-Id: I9f0e7e59922bd56b17889f72124b7d14b2433218 Reviewed-on: https://go-review.googlesource.com/c/162833 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
In module mode, building the current directory requires a go.mod file (in order to determine the import path of the package). Change the tests to pass explicit file arguments instead, since those can be built in module mode without defining a module. Updates golang#30228 Change-Id: I680c658d1f79645f73ad4d1e88189ea50a4852e9 Reviewed-on: https://go-review.googlesource.com/c/162837 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
We will soon switch GO111MODULE to 'on' by default, and when that happens these tests will otherwise break. Updates golang#30228 Change-Id: I1016d429b1dfb889d1aae8bc86fb2567cf0fc56f Reviewed-on: https://go-review.googlesource.com/c/162697 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
Change https://golang.org/cl/167160 mentions this issue: |
Change https://golang.org/cl/167181 mentions this issue: |
Commands run: go mod init go mod edit -go=1.11 go mod tidy go list -m all go test ./... Updates golang/go#30228 Change-Id: I759660fe7d96f1f3d4a4a465c302f524d06401cc Reviewed-on: https://go-review.googlesource.com/c/perf/+/167138 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Commands run: go mod init go mod edit -go=1.11 go mod tidy go list -m all go test ./... Updates golang/go#30228 Change-Id: I78d903d7151790b37f32a06f37427a50fcd2a83b Reviewed-on: https://go-review.googlesource.com/c/blog/+/167157 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Commands run: go mod init go mod edit -go=1.11 go mod tidy go list -m all go test ./... Updates golang/go#30228 Change-Id: I86819ac0a2704468903e34ca49308ce65149791b Reviewed-on: https://go-review.googlesource.com/c/term/+/167160 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Updates golang/go#30228 Change-Id: If138faaa001f557f82eb9d25812a0a89155f639d Reviewed-on: https://go-review.googlesource.com/c/exp/+/167217 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
Commands run: go mod init go mod edit -go=1.11 go mod tidy go list -m all go test ./... Updates golang/go#30228 Change-Id: Ied34225715beddec6610b793258a01da4a2c32b9 Reviewed-on: https://go-review.googlesource.com/c/exp/+/167218 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Commands run: go mod init go mod edit -go=1.11 go mod tidy go list -m all go test ./... Updates golang/go#30228 Change-Id: I3d7e4f59a98822691177973ec2d7a55a6216b78c Reviewed-on: https://go-review.googlesource.com/c/tour/+/167181 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Change https://golang.org/cl/167087 mentions this issue: |
Updates golang/go#27234 Updates golang/go#30228 Change-Id: Ibe281480398ff9d8c27657f399159885a75f646e Reviewed-on: https://go-review.googlesource.com/c/mobile/+/167179 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Commands run: go mod init go mod edit -go=1.11 go mod tidy go list -m all go test ./... Updates golang/go#30228 Updates golang/go#27234 Change-Id: Ibf3b104bfaa037e1a94a5327b5a56983d9744e73 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/167180 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Commands run: sed -i 's;// +build OMIT;// +build ignore,OMIT;' $(grep -l OMIT -r) go mod init go mod edit -go=1.11 go mod tidy go list -m all go test ./... Updates golang/go#30228 Updates golang/go#29598 Change-Id: I3d0a4787c1158572bed8dd3785ff02e16d1cc1f3 Reviewed-on: https://go-review.googlesource.com/c/talks/+/167159 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Change https://golang.org/cl/167703 mentions this issue: |
Copy golang.org/x/build/envutil.Dedup locally to avoid pulling in all of x/build. Commands run: go mod init go mod edit -go=1.11 go mod tidy go list -m all go test ./... Updates golang/go#30228 Change-Id: I0fc24565c08a73db067daf080b46f4aa82a63c41 Reviewed-on: https://go-review.googlesource.com/c/dl/+/167703 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Change https://golang.org/cl/167740 mentions this issue: |
This fixes TestFuncWithDuplicateLines (introduced in CL 167257) in module mode. Updates #30746 Updates #30228 Change-Id: I7b3e7192ae23f855c373e881389874ff6ffd49ad Reviewed-on: https://go-review.googlesource.com/c/go/+/167740 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org>
Change https://golang.org/cl/175441 mentions this issue: |
… resolve symlinks info.Name returns a name relative to the directory, so we need to prefix that directory in the Stat call. (This was missed in CL 141097 due to the fact that the test only happened to check symlinks in the current directory.) This allows the misc/ tests to work in module mode on platforms that support symlinks. Updates #30228 Updates #28107 Fixes #31763 Change-Id: Ie31836382df0cbd7d203b7a8b637c4743d68b6f3 Reviewed-on: https://go-review.googlesource.com/c/163517 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/175441 Reviewed-by: Andrew Bonventre <andybons@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Change https://golang.org/cl/222538 mentions this issue: |
The rsc.io/pdf package was added to the vendor directory 5 years ago in CL 13968, back when the vendor directory was a part of the Go 1.5 vendor experiment. The vendor.json file was written by hand in a format compatible with the govendor tool. By now, that tool has been deprecated in favor of the go command in module mode. A go.mod file requiring a newer version of rsc.io/pdf was added in CL 167137. Modify the vendor directory to use the newer rsc.io/pdf version by recreating vendor directory using go command in Go 1.14: rm -rf vendor go mod vendor It's possible the vendor directory isn't needed anymore and can be safely deleted in a future change. The scope of this CL is only to migrate from the deprecated govendor tool to the supported go tool; deleting the vendor directory can still be done in a future change. Remove the explicit mention of Go 1.5 vendor experiment from README since it's old, and not relevant by now. Add a contributing section. Updates golang/go#30228 Updates golang/go#33848 Change-Id: I95de95a3b2d81faf7235c675e5b8d425141f8d7a Reviewed-on: https://go-review.googlesource.com/c/arch/+/222538 Reviewed-by: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Change https://golang.org/cl/225205 mentions this issue: |
…n use The "runindir" tests used "go run", but relied on relative imports (which are not supported by "go run" in module mode). Instead, such tests must use fully-qualified imports, which require either a go.mod file (in module mode) or that the package be in an appropriate subdirectory of GOPATH/src (in GOPATH mode). To set up such a directory, we use yet another copy of the same overlayDir function currently found in the misc subdirectory of this repository. Fixes #33912 Updates #30228 Change-Id: If3d7ea2f7942ba496d98aaaf24a90bcdcf4df9f7 Reviewed-on: https://go-review.googlesource.com/c/go/+/225205 Reviewed-by: Ian Lance Taylor <iant@golang.org>
As noted in https://blog.golang.org/modules2019, “Our aim is for Go 1.13, scheduled for August 2019, to enable module mode by default (that is, to change the default from
auto
toon
) and deprecate GOPATH mode.”This issue tracks the first part of that goal: changing the default to
on
.The text was updated successfully, but these errors were encountered: