Skip to content

cmd/go: default to GO111MODULE=on #41330

Closed
@rsc

Description

@rsc

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:

Once those are done, I believe we can flip the default. If there are any other blocking issues, please comment. Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions