-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release v2.10.1 hangs on Starting mockery dry-run=false version=v2.10.1 #442
Comments
resolved for now by pinning previous version |
I think I know where this might be coming from. My suspicion isn't that it's hanging, but that it's taking a lot longer than normal. Probably from this: 4e181be Please try v2.10.2, if that does work I will revert the above commit. |
At times it does hang even the lastest release. I think this is not stable. @LandonTClipp might have to reverse the changes because this may cause some panic |
Same here |
Folks can you try the latest release, I have reverted a change that I believed was causing the runtime issue, although we may have introduced some other bug. @emmanuel099 is showing a list of versions that work: #444 |
@taylow could you provide a reproducer for this issue? |
@LandonTClipp happy to provide as much info as I can! My current setup is:
If there is anything else you need/could help here please let me know! |
Thanks @taylow . Could you provide a reproducible example of this error happening? We have various matrix testing for Go versions and OS environments which haven't caught this, so I would love to fix this issue if we can isolate where it's coming from. |
@LandonTClipp, after lots of checking out and generating mocks, we managed to narrow it down to a generic package we use called Lo. The following code will reproduce the error: package bugged
import (
"github.com/samber/lo"
)
func Bugged() {
test := []string{"aaa", "bbb", "ccc"}
lo.Contains(test, "test")
} |
Simply importing the package causes the same error import _ "github.com/samber/lo" |
I see, thanks for the information @taylow . Unfortunately, mockery is incompatible with Golang 1.18 features so you will have to pin your dependencies on versions that don't use generics. I do plan to add support for generics, however PRs to do this are more than welcome and will speed up the whole process. |
Building mockery v2.10.4 with |
@LandonTClipp I think that we have two different issues. Mockery cannot create mocks for interfaces with generics vs. mockery fails because of generics unrelated to the mocked interface. The first issue requires additional code in mockery, whereas the second is definitely a bug IMHO:
This bug can either be fixed by adding |
Closing this issue, please let me know if anyone is having any further issues. |
Still have the |
Noted when running
mockery --all --inpackage --case snake
The text was updated successfully, but these errors were encountered: