Description
Back in Go 1.13 we tried defaulting to GO111MODULE=on but discovered a bunch of things that needed to be smoother before making it the default. Instead we added GO111MODULE=auto and made that the default, so that people with a go.mod could always get modules, but people without a go.mod would still get GOPATH mode.
The general plan since Go 1.11 to retire GOPATH mode has not changed. That's still an important step.
We believe Go 1.16 will have a smooth enough module experience to make it the default always. At that point GOPATH will be deprecated, to be removed entirely in some future Go version, perhaps Go 1.17.
We need to change the default soon, so that we can use it ourselves during the rest of the Go 1.16 cycle before shipping it in the release.
There are two important functionality changes remaining before we can change the default:
- Removing automatic updating of go.mod by most commands (cmd/go: default to & improve -mod=readonly #40728).
- A standalone (outside a module) command to download and install a binary, which will be
go get pkg@version
(go get pkg@latest
if you want the latest version) (cmd/go: 'go install' should install executables in module mode outside a module #40276).
Once those are done, I believe we can flip the default. If there are any other blocking issues, please comment. Thank you.