You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go 1.23 introduced generic type aliases behind a GOEXPERIMENTAL flag.
These are now available in Go 1.24. See golang/go#46477
It is desired that mockgen can generate mocks that correctly map generic type params of an
alias to the underlying generic interface type.
Why the feature is needed
When mockgen is given the name of a generic type alias that resolves
to a generic interface, with #217 fixed, it misses the mapping of generic arguments, which might be
references to generic type params from the instantiated generic alias type.
An update on this, we've taken a different approach entirely in https://github.com/canonical/gomock where this is fixed there but the fork drives deeper into using generics across the entire project.
Activity
tkrause commentedon Mar 11, 2026
Running into the same issue. Any idea when the linked PR can be looked at?
hpidcock commentedon May 19, 2026
An update on this, we've taken a different approach entirely in https://github.com/canonical/gomock where this is fixed there but the fork drives deeper into using generics across the entire project.