Skip to content
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: vendored dependencies default to go1.11 at head #45109

Closed
kevinburke1 opened this issue Mar 18, 2021 · 3 comments
Closed

cmd/go: vendored dependencies default to go1.11 at head #45109

kevinburke1 opened this issue Mar 18, 2021 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@kevinburke1
Copy link

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

go env Output
$ go env
GO111MODULE="off"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/kevin/Library/Caches/go-build"
GOENV="/Users/kevin/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/kevin/pkg/mod"
GONOPROXY="github.com/meterup"
GONOSUMDB="github.com/meterup"
GOOS="darwin"
GOPATH="/Users/kevin"
GOPRIVATE="github.com/meterup"
GOPROXY="direct"
GOROOT="/Users/kevin/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/kevin/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="devel +e4253cd023 Thu Mar 18 19:15:12 2021 +0000"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/s1/909yt58s4wj8h_7v7frr8rkm0000gn/T/go-build1139536333=/tmp/go-build -gno-record-gcc-switches -fno-common"
GOROOT/bin/go version: go version devel +e4253cd023 Thu Mar 18 19:15:12 2021 +0000 darwin/amd64
GOROOT/bin/go tool compile -V: compile version devel +e4253cd023 Thu Mar 18 19:15:12 2021 +0000
uname -v: Darwin Kernel Version 19.6.0: Tue Jan 12 22:13:05 PST 2021; root:xnu-6153.141.16~1/RELEASE_X86_64
ProductName:	Mac OS X
ProductVersion:	10.15.7
BuildVersion:	19H524
lldb --version: lldb-1200.0.44.2
Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
gdb --version: GNU gdb (GDB) 10.1

What did you expect to see?

I expect the vet check to complete since the Go version in go.mod is Go 1.16.

What did you see instead?

$ make vet
GO111MODULE=on go vet ./...
# github.com/mholt/archiver/v3/zip
vendor/github.com/mholt/archiver/v3/zip/zip.go:153:32: 0o/0O-style octal literals requires go1.13 or later (-lang was set to go1.11; check go.mod)
vendor/github.com/mholt/archiver/v3/zip/zip.go:190:36: 0o/0O-style octal literals requires go1.13 or later (-lang was set to go1.11; check go.mod)

I have reproduced the issue in this sample repository: https://github.com/kevinburkemeter/repro-go-mod-vet

You should be able to download that and then run "make vet" to reproduce the issue.

@seankhliao seankhliao changed the title tip incorrectly reports "requires go1.13 or later" error cmd/go: non module dependencies default to go1.11 Mar 18, 2021
@seankhliao
Copy link
Member

cc @bcmills @jayconrod

@bcmills
Copy link
Contributor

bcmills commented Mar 18, 2021

Ooh, neato! This is a bad interaction between CL 302051 and #36876, I think.

@bcmills bcmills changed the title cmd/go: non module dependencies default to go1.11 cmd/go: vendored dependencies default to go1.11 at head Mar 18, 2021
@bcmills bcmills added the NeedsFix The path to resolution is known, but the work has not been done. label Mar 18, 2021
@bcmills bcmills self-assigned this Mar 18, 2021
@bcmills bcmills added this to the Go1.17 milestone Mar 18, 2021
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/303229 mentions this issue: cmd/go: assume Go 1.16 instead of Go 1.11 for dependencies that lack explicit 'go' directives

@golang golang locked and limited conversation to collaborators Mar 19, 2022
@rsc rsc unassigned bcmills Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

4 participants