binder icon indicating copy to clipboard operation
binder copied to clipboard

How to use global namespace?

Open zwcloud opened this issue 5 years ago • 3 comments

Set the namespace(s) to bind after the flag --bind. But what if one want to bind classes and functions defined in global namepsace?

Can we use binder like following?

binder \
--root-module MyRootModule \
--prefix /root/GeneratedBindings \
--suppress-errors \
--bind ""
-- ....

zwcloud avatar Jul 06 '20 12:07 zwcloud

Yes, that should work.

lyskov avatar Jul 08 '20 23:07 lyskov

Yes, that should work.

No. That doesn't work. I have tried.

zwcloud avatar Jul 13 '20 02:07 zwcloud

@zwcloud could you please double check your input flags and cross check them with what we use during testing? (see line https://github.com/RosettaCommons/binder/blob/master/test/self-test.py#L76). Binding objects from global namespace is exactly what we do when we run our Binder self-test. Here is input and output of one of these tests to check: https://github.com/RosettaCommons/binder/blob/master/test/T01.enum.hpp https://github.com/RosettaCommons/binder/blob/master/test/T00.basic.ref .

As an idea of what to try to debug this: Could you please try to feed one of our tests files in your environment (say https://github.com/RosettaCommons/binder/blob/master/test/T01.enum.hpp) and see what output will you get? Thannks,

lyskov avatar Jul 21 '20 19:07 lyskov