-
Notifications
You must be signed in to change notification settings - Fork 8
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 path and naming issues with intertype codegen #95
Conversation
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.
Just waiting for @olynch to see my question about unforeseen consequences of taking that basename. I think the fix is correct, but wanted to double check. I am happy to also rename the methods and switch to using multiple dispatch. That will be a breaking API change but it is better to break now, before we get users.
@@ -307,7 +307,7 @@ end | |||
|
|||
function include_intertypes(into::Module, file::String, imports::AbstractVector) | |||
endswith(file, ".it") || error("expected a file ending in \".it\"") | |||
name = Symbol(chop(file; tail=3)) | |||
name = Symbol(basename(chop(file; tail=3))) |
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.
@olynch, any unforeseen consequence of this with respect to hierarchically named intertypes modules? We don't actually want path separators in these names right?
* Dispatch instead of separate functions for module create * Dispatch on singleton subtypes
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 all looks good, thanks @fivegrant!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #95 +/- ##
==========================================
- Coverage 90.57% 90.33% -0.25%
==========================================
Files 22 22
Lines 2059 2059
==========================================
- Hits 1865 1860 -5
- Misses 194 199 +5 ☔ View full report in Codecov by Sentry. |
Addresses a few things I encountered in an MR PR:
path
argumentBEFORE MERGING, we would ideally merge this very small refactor into this PR. I separated it out just in case you didn't actually want it.now merged