Skip to content

cmd/go: need to backport relaxing of go.mod go verb constraints to 1.11 series #28974

@myitcv

Description

@myitcv

What version of Go are you using (go version)?

go version go1.11.2 linux/amd64
go version devel +bb3b24bffc Mon Nov 26 05:08:44 2018 +0000 linux/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/myitcv/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/tmp/tmp.zzDR1I4tSd"
GOPROXY=""
GORACE=""
GOROOT="/home/myitcv/gos"
GOTMPDIR=""
GOTOOLDIR="/home/myitcv/gos/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/tmp/tmp.eq9VZVtX74/hello/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build257586328=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Go 1.12 attempts to build/test/whatever a module with a go verb specifying the next or higher >= 1.13. However, this is a hard failure for Go 1.11.

$ cd $(mktemp -d)
$ go version
go version devel +bb3b24bffc Mon Nov 26 05:08:44 2018 +0000 linux/amd64
$ cat <<EOD > go.mod
module example.com/blah
go 1.13
EOD
$ cat <<EOD > blah.go
package blah
EOD
$ go test
?       example.com/blah        [no test files]

# switch to Go 1.11.2

$ go version
go version go1.11.2 linux/amd64
$ go test
go build example.com/blah: module requires Go 1.13

What did you expect to see?

I think we will need a Go 1.11 release in order for modules created with Go 1.12 to be usable by those who don't immediately upgrade to 1.12.

What did you see instead?

Failures as above.

cc @rsc @bcmills @ianlancetaylor

Metadata

Metadata

Assignees

No one assigned

    Labels

    CherryPickApprovedUsed during the release process for point releasesFrozenDueToAgeGoCommandcmd/goNeedsFixThe path to resolution is known, but the work has not been done.modules

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions