-
Notifications
You must be signed in to change notification settings - Fork 54
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
Move duplicate procedures to shared util modules #1070
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.
Looks good! Thank you! Agreed that this is probably the best approach until we have vendored library support. I left just a few small comments/questions inline.
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.
Looks great, thank you @PhilippGackstatter!
I apologize for the inaccurate instructions during our call, but it turned out that I myself did not fully understand what needed to be done. Thank you for the help!
No no, your instructions were great, no worries. I myself was confused about which approach we should go with, so all good! |
After a lot of back and forth in #1002 I think that making a new PR is easier as the approach in this PR is more minimal than in the other PR and reverting those changes in #1002 is more work than applying the necessary changes to
next
.This basically implements the conclusion from #1002 (comment)
This is the approach with minimal changes to only deduplicate procedures across kernel and miden lib and reexporting procedures from where they were previously used so the public interface is the same.
The
util
module was put in ashared
directory so we can useAssembler::add_modules_from_dir
with namespacekernel
to achieve the desiredkernel::util::module
namespacing. The alternative approach without theshared
directory would fail sincekernel::util
is not a validLibraryNamespace
.I'm using
util
instead ofutils
in anticipation of #1021, even thoughutils
is common and used instd::utils
for example. I'm fine with using both.What we're gaining in code deduplication with this approach we're losing with documentation duplication. We're not yet really doing anything with the MASM docs as far as I'm aware, but when we do, I think it would be great if reexports could inherit the docs from the original definition, unless overwritten.
closes #836