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
When using keeptree: True, inpackage: True and dir: "{{.InterfaceDir}}" together with interface that depend from each other, but from the same package, result in unnecessary import that prevent code from compiling.
This is an internal package, I haven't tested if outside of the internal subdirectory would make any difference. Still the path specified in my yaml file match exactly the import line generated.
Expected Behavior
I would think it should be possible for mockery to detect that internalbug is actually the same as the current package and shouldn't be there (and use of it in the file too).
Actual Behavior
It generate those unnecessary reference to internalbug that get the compiler unhappy.
The text was updated successfully, but these errors were encountered:
Yes, it does work when removing keeptree and it was there just due to migrating to latest mockery. Maybe it would be good to generate a warning when using it with packages.
Description
When using
keeptree: True
,inpackage: True
anddir: "{{.InterfaceDir}}"
together with interface that depend from each other, but from the same package, result in unnecessary import that prevent code from compiling.Mockery Version
2.32.2
Golang Version
1.20.5
Installation Method
Steps to Reproduce
Example code:
Will give the following result for B and C:
This is an internal package, I haven't tested if outside of the internal subdirectory would make any difference. Still the path specified in my yaml file match exactly the import line generated.
Expected Behavior
I would think it should be possible for mockery to detect that internalbug is actually the same as the current package and shouldn't be there (and use of it in the file too).
Actual Behavior
It generate those unnecessary reference to internalbug that get the compiler unhappy.
The text was updated successfully, but these errors were encountered: