chore: Upgrade Go toolchain to 1.25.x#1689
Conversation
Main goal is to be able to use `synctest` package to capture some goroutine leaks bugs It is experemental in v1.24 and becomes part of standard library in v1.25. https://go.dev/blog/synctest Signed-off-by: Kaviraj <[email protected]>
SpencerTorres
left a comment
There was a problem hiding this comment.
Curious how this may affect users on 1.24. We can revert if needed, but it should be fine
|
@kavirajk Is there any particular reason this is set to 1.25.3 rather than 1.25.0? |
|
I don't think it even needs to be 1.25 here. Having 1.25.3 pushes every dependent module to that version, while |
|
Ah I see. didn't know it would be too much problem. May be it's worth keeping it at 1.24 for a bit? (with |
|
Yes, I think that would be the right thing to do. The only reason I noticed is because I bumped clickhouse-go in Grafana's Alloy, which bumped the minimum version and invalidated all the caches and made me wait a very long time for it to recompile everything. |
In ClickHouse#1689, Go minimal version was bumped to 1.25.3, preventing usage by earlier versions of Go, notably 1.24.x. This is not needed as the test using synctest is protected by a build constraint, so it works just fine. In this PR, the toolchain is set to 1.25.4, such that most people hacking on this package will use Go 1.25. However, for test workflows, we use GOTOOLCHAIN=local to respect the target Go version. This last bit can be removed with actions/setup-go@v6 as it will set GOTOOLCHAIN=local itself. We could also not set the toolchain at all in go.mod. It would work too. The alternative to set GOEXPERIMENT=synctest does not work as the API of this package was modified between 1.24 and 1.25.
Summary
Main goal is to be able to use
synctestpackage to capture some goroutine leaks bugsIt is experemental in v1.24 and becomes part of standard library in v1.25.
https://go.dev/blog/synctest
So that we remove build tags from this these tests.
https://github.com/ClickHouse/clickhouse-go/pull/1688/files#r2435808409
Checklist
Delete items not relevant to your PR: