jaeandersson / swig

SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages.
http://www.swig.org
Other
23 stars 19 forks source link

Fix extending class in subpackage. #92

Closed yuriy-kozlov closed 6 years ago

yuriy-kozlov commented 6 years ago

Use base class package name rather than module name because MATLAB requires it to be fully qualified.

yuriy-kozlov commented 6 years ago

This fixes #55 or at least part of it.

jaeandersson commented 6 years ago

Thank you for your contribution!

nunoguedelha commented 6 years ago

This PR seems to break previous configurations for generating bindings, typically in simple cases where we generate all bindings for a single module, into a single package folder, both with same name. Here is an example of issue: https://github.com/robotology-dependencies/swig/issues/3. @yuriy-kozlov @jaeandersson it would be nice to have some more details or a clear explanation of the impacts on the module definition (in the module file <module>.i) or the generated tree structure.

nunoguedelha commented 6 years ago

CC @traversaro

yuriy-kozlov commented 6 years ago

@nunoguedelha do you specify the package= option in %module? I have it everywhere and I think missing it is triggering this bug. It should be optional, of course, so I can work on a fix.

nunoguedelha commented 6 years ago

@yuriy-kozlov thank you, I'll try it ASAP and let you know. Of course, if you can make it optional it would be great, because in our case I think the option would be over-killing, since we always have a single module per package.

jaeandersson commented 6 years ago

So, should this commit be reverted then?

nunoguedelha commented 6 years ago

Personally, I realize I won't have time to run further tests following @yuriy-kozlov recommendations. I was hopping we could get a fix from him for making the feature optional, and so backward compatible with old configurations. Otherwise I suggest to revert the commit.