oliver006/redis_exporter

go 1.20.x no longer supported?

josh-m-sharpe opened this issue · 3 comments

Just a question - looks like some 1.22 changes went in a few week sago. Was the intent to not be backwards compatible?

Seems like yum/dnf install golang on a bunch of distros still install 1.20, so this introduces an extra hurdle

bash-5.2# go version
go version go1.20.12 linux/arm64

bash-5.2# go build .
go: downloading github.com/prometheus/client_golang v1.18.0
go: downloading github.com/sirupsen/logrus v1.9.3
go: downloading github.com/gomodule/redigo v1.9.2
go: downloading github.com/mna/redisc v1.4.0
go: downloading golang.org/x/sys v0.15.0
go: downloading github.com/prometheus/client_model v0.6.0
go: downloading github.com/prometheus/common v0.45.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.2.0
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading google.golang.org/protobuf v1.32.0
go: downloading github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0
github.com/oliver006/redis_exporter/exporter: cannot compile Go 1.22 code

Ah yes, good catch. I did upgrade to 1.22 because there were compile issues with a dependency if I recall that right. I just tried go build . with 1.20 in the go.mod file and it works now 🤷‍♀️
I'm fine with going back to 1.20 in the go.mod file but I want to be clear that I won't make any promises about supporting old major Golang versions for forever.
I'll make the change as part of #887

👍 thanks. makes sense. as long as it isn't much of a blocker it'll probably make some things simpler.

Fixed in #887