Skip to content
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

modtool fix noblock codegen #7318

Merged
merged 2 commits into from
Jun 2, 2024

Conversation

marcusmueller
Copy link
Member

Description

Due to an expectation mismatch between addition of binding code and pydoc code, noblock OOT python bindings did not compile.

Also required that modtool's add functionality only adds make bindings to actual blocks that have them.

Related Issue

Fixes #6960

Which blocks/areas does this affect?

modtool/OOTs

Checklist

@marcusmueller marcusmueller marked this pull request as ready for review May 6, 2024 00:42
@willcode
Copy link
Member

@marcusmueller are you still working on this one, or should we make it draft?

@willcode
Copy link
Member

Could you squash the last 2 commits, then I'll merge.

Two issues: modtool's `add` functionality incorrectly adds binding
specification for a non-existing `make` function to the generated
bind_*.cc code. And: the templates for pydocs and bindings differ in how
they start counting overloaded constructors.

bindtool generates D() properties for pybind11'ed classes.

To handle overloaded methods, the pydoc_h strings carry a trailing `_N`,
which the template code automatically increments, when it's detected
that there's more than one member of the same type and name.

However, there was a mismatch between counting of constructor duplicity
in the pybind11 bind_classname.cc-generating template, and the
pydoc-generating template, such that the pydoc-generating template did
not automatically add a _0 to the first constructor, whereas the
bind_classname.cc expected that (the ctor name being identical to the
class name).

Fixing `add`'s `make` wrapping required modification of the
`header_info` structure entertwined with how the bindtool templates were
fixed, so these two changes ended up in the same commit.

Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
@marcusmueller
Copy link
Member Author

@willcode ping!

@willcode willcode merged commit e325f75 into gnuradio:main Jun 2, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gr_modtool generates cpp noblock that does not compile
2 participants