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: go mod gets dependency, which can not built, because needs newer go version #46703

Closed
Ragnar-BY opened this issue Jun 11, 2021 · 3 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@Ragnar-BY
Copy link

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

$go version go1.15.2 linux/amd64

Does this issue reproduce with the latest release?

I don`t know

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/user/.cache/go-build"
GOENV="/home/user/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/user/go/pkg/mod"
GONOPROXY="git.dar.kz"
GONOSUMDB="git.dar.kz"
GOOS="linux"
GOPATH="/home/user/go"
GOPRIVATE="git.dar.kz"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
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-build726176060=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I have project which is built with go1.15 and use go modules
My project has labstack/echo as dependency
And after go mod tidy
I have

go.mod
module myproject

go 1.15

require (
...
github.com/labstack/echo/v4 v4.3.0
...
)


But this version of labstack/echo is built with go1.16, and I get next error

myproject imports
        github.com/labstack/echo/v4/middleware tested by
        github.com/labstack/echo/v4/middleware.test imports
        io/fs: package io/fs is not in GOROOT (/usr/local/go/src/io/fs)
myproject imports
        github.com/labstack/echo/v4/middleware tested by
        github.com/labstack/echo/v4/middleware.test imports
        testing/fstest: package testing/fstest is not in GOROOT (/usr/local/go/src/testing/fstest)

What did you expect to see?

I expect, that go mod will get version of modules, that can be built with same go version as mine

What did you see instead?

I get module, that built with go1.16, but I need module for go1.15

I can fix it but changing go.mod file and downgrading version

@cherrymui cherrymui changed the title go mod gets dependency, which can not built, because needs newer go version cmd/go: go mod gets dependency, which can not built, because needs newer go version Jun 11, 2021
@cherrymui cherrymui added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 11, 2021
@cherrymui
Copy link
Member

Does github.com/labstack/echo/v4 v4.3.0 actually depends on Go 1.16? If so, I'm not sure there is anything we can do here.

cc @bcmills @jayconrod @matloob

@cherrymui cherrymui added this to the Backlog milestone Jun 11, 2021
@bcmills
Copy link
Contributor

bcmills commented Jun 11, 2021

@Ragnar-BY, upgrade to Go 1.15.10.

@bcmills
Copy link
Contributor

bcmills commented Jun 11, 2021

Duplicate of #44792

@bcmills bcmills marked this as a duplicate of #44792 Jun 11, 2021
@bcmills bcmills closed this as completed Jun 11, 2021
@golang golang locked and limited conversation to collaborators Jun 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants