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

x/exp: wrong go.mod go version #57639

Closed
Shubhaankar-Sharma opened this issue Jan 5, 2023 · 3 comments
Closed

x/exp: wrong go.mod go version #57639

Shubhaankar-Sharma opened this issue Jan 5, 2023 · 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

@Shubhaankar-Sharma
Copy link

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

$ go version
go version go1.19.4 darwin/arm64

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
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/shubhaankar/Library/Caches/go-build"
GOENV="/Users/shubhaankar/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/shubhaankar/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/shubhaankar/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.19.4"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
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 arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/j2/gmd4pj9j35q4w1t01mb1ng480000gn/T/go-build2203409633=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

If i use golang.org/x/exp/slog in a project with go 1.18 it errors because
https://github.com/golang/exp/blob/master/slog/level.go#L95 Here, the type atomic.Int64 is being used
which was introduced in go 1.19 but golang.org/x/exp requires go version of 1.18 as its minimum version which didn't support this type

What did you expect to see?

What did you see instead?

@Shubhaankar-Sharma Shubhaankar-Sharma changed the title affected/package: golang.org/x/exp golang.org/x/exp: wrong go.mod go version Jan 5, 2023
@seankhliao seankhliao changed the title golang.org/x/exp: wrong go.mod go version x/exp: wrong go.mod go version Jan 5, 2023
@gopherbot gopherbot added this to the Unreleased milestone Jan 5, 2023
@ianlancetaylor
Copy link
Contributor

CC @jba

@jba
Copy link
Contributor

jba commented Jan 6, 2023

We're only going to support slog for 1.19 and above.
It's OK that the go.mod go line says 1.18. That has to do with language features; it need not reflect the needed standard library version (although I agree it would be less confusing if it did).

@heschi heschi added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 6, 2023
@heschi
Copy link
Contributor

heschi commented Jan 6, 2023

Seems like this is WAI, closing as such.

@heschi heschi closed this as not planned Won't fix, can't repro, duplicate, stale Jan 6, 2023
@golang golang locked and limited conversation to collaborators Jan 6, 2024
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

5 participants