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

slices: package slices is not in GOROOT #811

Closed
lei0320 opened this issue Dec 26, 2024 · 2 comments
Closed

slices: package slices is not in GOROOT #811

lei0320 opened this issue Dec 26, 2024 · 2 comments

Comments

@lei0320
Copy link

lei0320 commented Dec 26, 2024

run & got:

$ go get github.com/onsi/gomega/...
github.com/onsi/gomega/matchers/support/goraph/bipartitegraph imports
        slices: package slices is not in GOROOT (/Users/xxx/go/go1.18/src/slices)

go env:

GO111MODULE="on"
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/xxx/Library/Caches/go-build"
GOENV="/Users/xxx/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=" -mod=readonly"
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/xxx/go/pkg/mod"
GONOPROXY="*.xxx.com"
GONOSUMDB="*.xxx.com"
GOOS="darwin"
GOPATH="/Users/xxx/go"
GOPRIVATE="*.xxx.com"
GOPROXY="xxx,direct"
GOROOT="/Users/tal/go/go1.18"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/Users/xxx/go/go1.18/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.18"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/xxx/xxx/xx/xx/go.mod"

os info:

Apple M3
mac OS 14.5
@lei0320
Copy link
Author

lei0320 commented Dec 26, 2024

and when i run a test, it output:

../../../go/pkg/mod/github.com/onsi/[email protected]/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go:4:2: package slices is not in GOROOT (/Users/xxx/go/go1.18/src/slices)

@thediveo
Copy link
Collaborator

thediveo commented Dec 26, 2024

Hi there! It seems you are using a Go version 1.18 which is unsupported by the current Gomega (and Ginkgo) versions. We follow the same support strategy of the Go toolchain itself, supporting the current stable as well as the previous stable. As there have been several CVEs on older Go versions that are fixed only in more recent versions, we recommend upgrading your Go toolchain. However, on macos there is the danger that newer Go version sometimes drop support for older macos version.

Alternatively, you need to get a much older version of Gomega that was released in the Go 1.18-1.19 time frame.

(As there are many free Linux distributions this tends to not be a problem on Linux where you can most of the time update hardware that has long since declared obsolete by its makers, in contrast to Apple.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants