-
Notifications
You must be signed in to change notification settings - Fork 47
fix: Update maker.Make()
to work with a struct across files
#72
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: Update maker.Make()
to work with a struct across files
#72
Conversation
This commit fixes `maker.Make()` to no longer expect a struct's definition to be defined in all input files. Fixes Issue vburenin#69
@grivera64 I think the changes here are the same as the ones in #65 but implemented differently? |
@gaby Ah yes, it looks like they did a more convenient check. Instead of checking each file's declared types, that PR checks all declared types directly outside of the for loop. I think it may be cleaner to do that instead. I believe that #65 does not include any tests though. I've added some here which should be compatible with both versions. Would you like me to edit this PR to include the Or would we want to merge that other PR and merge this one with the new test case? |
@grivera64 Lets update this one with the changes from #65 that way we can use your unit-tests |
Sounds good! I will make a new commit moving the check outside of the for loop like in #65. |
@gaby Done! I also reverted the name change from |
maker.Make()
to work with a struct across filesmaker.Make()
to work with a struct across files
@grivera64 Seems like #66 also had similar changes, although it was created by the same person as #65 so it's probably old code from another branch? |
It seems that PR #66 was created with the same commit history as #65 (maybe checked out a branch based on #65), but is an unrelated issue. #66 tries to fix the situation where the output interface's package is different from the input package. In these cases, any non built-in types declared in the package should be prefixed by the appropriate package (and be imported) when generating the interface in the new package. |
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.
👍 LGTM
maker.Make()
to work with a struct across filesmaker.Make()
to work with a struct across files
Description
This PR fixes
maker.Make()
to no longer expect a struct's definition to be defined in all input files.Changes
maker.validateStructType()
->maker.containsStructType()
(WIP)Add tests for the new functionalityFixes Issue #69