-
Notifications
You must be signed in to change notification settings - Fork 782
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
refs #4286 -- allow setting submodule on declarative pymodules #4301
Conversation
f4c04ca
to
6fdcf0e
Compare
This makes a lot of sense, thanks. I wonder, should we go further and make it so that That way, explicitly marking Maybe that makes the rules too magical and complex 🤔. I think it's hopefully quite intuitive though? |
I would like to auto-set submodule, but figured I would do this in two
parts.
…On Mon, Jul 1, 2024, 9:20 AM David Hewitt ***@***.***> wrote:
This makes a lot of sense, thanks. I wonder, should we go further and make
it so that submodule is set by default when nested, similar to what we
already do with module setting?
That way, explicitly marking submodule is only necessary if the module is
"top-level" as far as Rust source structure goes.
Maybe that makes the rules too magical and complex 🤔. I think it's
hopefully quite intuitive though?
—
Reply to this email directly, view it on GitHub
<#4301 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBE4XDWCAM3K27HSUKLZKFJSBAVCNFSM6AAAAABKDOUMZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBQGEZDINJUGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
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.
Understood, a follow up seems ok to me.
Just a couple of final thoughts on this PR in that case 👍
pymodule_module_impl(module, is_submodule) | ||
} | ||
Item::Fn(function) => { | ||
parse_macro_input!(args as Nothing); |
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 think it seems reasonable to me for function modules to also support submodule
?
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'm not sure it's relevant for function modules -- there's never been a need to use #[pymodule]
for submodules with functions.
1e6dd87
to
9c154b5
Compare
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, thanks! One tiny nit & then please merge :)
No description provided.