-
Notifications
You must be signed in to change notification settings - Fork 412
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
Fix replace-type for different packages from the same source #710
Conversation
@LandonTClipp had to add the type to the @rkoehl05 can you see if this fixes your problem? |
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #710 +/- ##
===================================================
+ Coverage 74.88090% 74.91349% +0.03258%
===================================================
Files 9 9
Lines 2309 2312 +3
===================================================
+ Hits 1729 1732 +3
Misses 442 442
Partials 138 138
☔ View full report in Codecov by Sentry. |
Thanks @RangelReale! I tested with my reproducer and I was able to generate a working mock. |
@RangelReale thanks so much for this. I converted this to a draft because you mentioned this is still a WIP. Please ping me when you're ready for me to review. |
@LandonTClipp I updated the description, it should be ready now. |
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.
Good implementation. Just minor nitpicks about the naming that could make this a bit clearer.
type Fiz interface { | ||
FA(f fiz1.Fiz1) | ||
FB(f fiz2.Fiz2) | ||
} |
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.
I would request you add a short README.md to example_project/fiz
explaining what this package is testing.
Also I'd like it to be renamed to something more descriptive like replaceType
or something.
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.
renamed the files and types, and added a README.
if !f(item.from, item.to) { | ||
break | ||
// check most specific first | ||
for _, hasType := range []bool{true, false} { |
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.
Good solution 👍🏻
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.
Awesome thank you!
@RangelReale if you could squash the commits down to one, we can merge away. |
- check more specific replace types first
6495e93
to
ee33b3d
Compare
rebased to master, see if this is ok. |
Thank you very much for getting this out. I lean heavily on people submitting PRs ❤️ |
Description
When different packages that map to the same source package and mapped with replace-type, the package of the first one are used for all other packages.
Type of change
Version of Golang used when building/testing:
How Has This Been Tested?
Checklist