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

Overly aggressive namespace skipping #26

Open
phdum opened this issue Oct 30, 2019 · 1 comment
Open

Overly aggressive namespace skipping #26

phdum opened this issue Oct 30, 2019 · 1 comment

Comments

@phdum
Copy link
Member

phdum commented Oct 30, 2019

Hi,

I was trying to wrap a file with functions contained a namespace simple_ops. Although I added the -N simple_ops flags when running c++2py, none of the functions in the namespace were wrapped.

The origin of this is that there is a namespace filtering in cpp2desc.py (line 72; I'm using the cpp2py now included in triqs 2.2.x).

    namespaces_to_skip = ['std', 'boost', 'detail', 'impl']

Because "simple_ops" contains "impl" as a substring, this is filtered out. (If I set namespaces_to_skip = [] everything is done correctly.) This is probably not the desired behavior and seems a much to aggressive filtering.

Especially since we manually have to specify which namespaces to wrap via the '-N' command, is this filtering really needed?

In any case, it would be nice to get a message if namespaces are being skipped. It took a while to understand what went wrong.

Thanks!

Philipp

@Wentzell
Copy link
Member

@phdum Thank you for pointing this out!
I agree that this behavior is too aggressive.
We should refrain from filtering any namespaces except for maybe the exact match std.
Additional filtering should be left to the user.

Note that in general you do not have to specify any namespaces with -N.

We will take your issue into account in the changes for the upcoming Python3 port.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants