onsi / gomega

Ginkgo's Preferred Matcher Library

Home Page:http://onsi.github.io/gomega/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

1.34.0 cannot be used with golang 1.20

gibizer opened this issue · comments

Bumping from 1.33.1 to 1.34.0 in a golang 1.20 project fails with:

/home/gibi/go/pkg/mod/github.com/onsi/gomega@v1.34.0/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go:4:2: package slices is not in GOROOT (/usr/lib/go-1.20/src/slices)

See also: openstack-k8s-operators/nova-operator#837 (comment)

I think the fix in #766 introduced "slices" dependency that is not in the standard lib in golang 1.20

hey there - I'll pull in the PR but need to point out that there is no LTS release for Gomega. Gomega supports the latest two versions of Go in line with Go's own release policy - so 1.20 is, formally, not "officially" supported any more.

Thansk for accepting the fix.

Of course an alternative fix would be to declares 1.21 as minimum golang version in the go.mod file.

go 1.20

But since it was still stating 1.20 I thought that the intention was to keep the compatibility. So I formulated my fix in a way to make the least disturbing change.

Thank you for your effort on gomega!