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
{{ message }}
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
Actual behavior Using -aux_files when generating a mock for an interface with an embedded interface, combined with overlapping package names and a resulting named import can cause the generated code to use the wrong package name for parameters of the nested interface. Generating without the -aux_files flag does not have the same issue.
Expected behavior No errors in generated code when using -aux_files.
To Reproduce Steps to reproduce the behavior
mockgen_issue.zip
The attached zip contains a minimal reproduction case that is somewhat modeled after how it occurred in our codebase, running the mockgen command in foo.go will generate an invalid mock.
Additional Information
gomock mode (reflect or source): source
gomock version or git ref: v1.6.0
golang version: 1.18
Can be worked around by not using -aux_files or by turning the overlapping package name import into a differently named import as well.
Triage Notes for the Maintainers
Issue regarding -aux_files, which we were using but after retrying without it seems like we might not need it anymore, but as long as it's not deprecated it should still result in correct mock generation.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Actual behavior Using -aux_files when generating a mock for an interface with an embedded interface, combined with overlapping package names and a resulting named import can cause the generated code to use the wrong package name for parameters of the nested interface. Generating without the -aux_files flag does not have the same issue.
Expected behavior No errors in generated code when using -aux_files.
To Reproduce Steps to reproduce the behavior
mockgen_issue.zip
The attached zip contains a minimal reproduction case that is somewhat modeled after how it occurred in our codebase, running the mockgen command in
foo.go
will generate an invalid mock.Additional Information
Can be worked around by not using -aux_files or by turning the overlapping package name import into a differently named import as well.
Triage Notes for the Maintainers
Issue regarding -aux_files, which we were using but after retrying without it seems like we might not need it anymore, but as long as it's not deprecated it should still result in correct mock generation.
The text was updated successfully, but these errors were encountered: