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

1.34.0 cannot be used with golang 1.20 #774

Closed
gibizer opened this issue Jul 29, 2024 · 2 comments · Fixed by #775
Closed

1.34.0 cannot be used with golang 1.20 #774

gibizer opened this issue Jul 29, 2024 · 2 comments · Fixed by #775

Comments

@gibizer
Copy link
Contributor

gibizer commented Jul 29, 2024

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

gibizer added a commit to gibizer/gomega that referenced this issue Jul 29, 2024
The onsi#766 introduced dependency to slices but that module is not in the
standard lib in golang 1.20.

Closes: onsi#774
@onsi
Copy link
Owner

onsi commented Jul 29, 2024

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.

@onsi onsi closed this as completed in #775 Jul 29, 2024
onsi pushed a commit that referenced this issue Jul 29, 2024
The #766 introduced dependency to slices but that module is not in the
standard lib in golang 1.20.

Closes: #774
@gibizer
Copy link
Contributor Author

gibizer commented Jul 29, 2024

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!

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

Successfully merging a pull request may close this issue.

2 participants