cadence icon indicating copy to clipboard operation
cadence copied to clipboard

chore: Go 1.24, and mockery, x/tools, sqlite to support it

Open Groxx opened this issue 4 months ago • 1 comments

After much yamling of files, Go 1.24 support is ready! This is the non-WIP version of #7111 which got kicked off due to #7093 (but it does not contain those changes, this is just roughly the minimum needed for 1.24).

Library changes

This migrates a relative few mocks to github.com/vektra/mockery/v3, because v2 doesn't support Go 1.24+. The good news is that it's MUCH faster now, and more flexible, though only for a few types.

If https://github.com/vektra/mockery/pull/1030 gets accepted, we could do the same for our go.uber.org/mock mocks, but currently the license is questionable in the fork (for CNCF purposes) and the changes are non-trivial. So getting mockery to accept it (which might involve go.uber.org/mock accepting it) is likely the best route, for a variety of reasons.

go.uber.org/mock's upgrade seems mostly harmless and I was hoping it'd solve some of the test failures (it did not), so I've just left it in. Unfortunately it actually makes mock-codegen worse, ~1 arg per mock function on some types is renamed from something useful to arg0 or arg4 (position varies). I have no idea why that happens, but it doesn't seem too critical to maintain, and it's stable so it's not a codegen concern.

github.com/ncruces/go-sqlite3 has a minimal upgrade to support go 1.24, as we were getting segfaults and wasm panics without the upgrade. We could upgrade it to latest, but I'm holding off on that for the moment because it might be harder to achieve in our monorepo :| (apologies to OSS folks)

Groxx avatar Sep 09 '25 01:09 Groxx

also there's some check stuff failing, but unsure what the deal was there

davidporter-id-au avatar Sep 12 '25 18:09 davidporter-id-au