onsi / gomega

Ginkgo's Preferred Matcher Library
http://onsi.github.io/gomega/
MIT License
2.18k stars 284 forks source link

refactor: support Go 1.19 by replacing all 'any' #604

Closed TomerJLevy closed 1 year ago

TomerJLevy commented 1 year ago

I'm getting errors while running with Go 1.19:

github.com/onsi/gomega/internal

/tmp/go/pkg/mod/github.com/onsi/gomega@v1.24.0/internal/polling_signal_error.go:19:33: undefined: any /tmp/go/pkg/mod/github.com/onsi/gomega@v1.24.0/internal/polling_signal_error.go:40:14: undefined: any /tmp/go/pkg/mod/github.com/onsi/gomega@v1.24.0/internal/polling_signal_error.go:56:65: undefined: any note: module requires Go 1.18

github.com/onsi/ginkgo/v2/internal

/tmp/go/pkg/mod/github.com/onsi/ginkgo/v2@v2.5.0/internal/writer.go:77:29: undefined: bytes.Cut

[2022-11-09T07:55:05.369Z] note: module requires Go 1.18

onsi commented 1 year ago

hey this shouldn't be necessary. any was not removed in go 1.19. Can you check your installation and check the version of go that's actually running?

thediveo commented 1 year ago

In fact, any was introduced only as of Go 1.18 as part of Generics. This looks like the reporter uses a Go version before 1.18.