cadence icon indicating copy to clipboard operation
cadence copied to clipboard

WIP, needs larger migration: go 1.24 changes

Open Groxx opened this issue 5 months ago • 0 comments

High level stuff changed:

  • All go.mod and docker stuff points to 1.24
  • go list has made significant changes to what is allowed yet again, so check-gomod-version.sh has major changes, but does the same thing
  • Minor makefile fixes and ensuring go-generate checks versions before misbehaving
    • This is mostly unnecessary until a golang.org/x/tools check is in place, but it's a bit beneficial either way
  • 1.24 cleanup for timer.Stop() draining
  • Upgraded golang.org/x/tools to v0.32.0 to match our internal repos, needed to parse newer libraries / code supported by go 1.24

... and then got stuck on mockery.

We essentially have two options:

  1. migrate to mockery v3
  2. leave mockery, move its mocks over to mockgen

2 seems like it might be much easier, but 1 is worth considering at some point at least.


Mockery-v2 is not compatible with go 1.24, and v3 has fixed that. Unfortunately, mockery-v3 drops support for our go generate-command-line-flags entirely, and forces us to switch to their config files.

AFAICT that's a good change, and it should let us speed up code generation a lot (by running them as a dedicated pass, rather than in go generate). But it's non-trivial so I've stopped here.

There's a migration guide for whenever someone feels like tackling it: https://vektra.github.io/mockery/v3.5/v3/ We might even consider replacing gowrap with it tbh, it looks like it might be a pretty powerful code generator framework.

Groxx avatar Jul 29 '25 22:07 Groxx