-
Notifications
You must be signed in to change notification settings - Fork 680
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
Add mockgen
source mode for generics + bls imports
#2615
Conversation
scripts/mocks.mockgen.source.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the file that adds source mode mockgens. It seems like you can only exclude interfaces rather than specify which ones you want to mock which is... annoying
@@ -27,4 +27,22 @@ do | |||
|
|||
done < "$input" | |||
|
|||
# tuples of (source import path, comma-separated interface names to exclude, output file path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main change of this PR
mockgen
source mode for bls
importsmockgen
source mode for generics + bls
imports
mockgen
source mode for generics + bls
importsmockgen
source mode for generics + bls imports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice cleanup. I wonder if as another step we should just use a single mode, either reflect or source? It's not clear to me why we use both of them
I think we can move to source for all of them. I haven't moved them all to source since I really really dislike the exclude_interfaces since it makes the mockgen file so much more confusing. Opened an issue in the uber repo to track resolution: uber-go/mock#140 |
Why this should be merged
This PR codifies many of the mode=source mockgens that we've been doing manually (and more importantly adding it to CI)
How this works
Add mockgen source command
How this was tested
CI + manually