You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the addition of Python interfaces, we now have partial support for 2 scripting languages: ruby and python. Each language was placed into a separate folder for organization purposes, but this means we're repeating the SWIG .i files across both directories, i.e.:
It would be nice to reduce duplication as much as possible. The strength of SWIG is the multi-language support, so we should strive to write a SWIG file once and get support for multiple languages automatically.
Desired behavior
Have a single SWIG file for each class, which can be reused across all languages.
Alternatives considered
Keep separate files and deal with the extra overhead.
Implementation suggestion
Move the SWIG files to src/swig and update CMake to get them from there.
Additional context
I see that the SWIG files are slightly different between both directories right now. I imagine there must be good reasons to have differences for each language. I haven't dug into this yet, but I'd hope that SWIG would offer a solution for that use case, maybe using conditionals according to the language?
The text was updated successfully, but these errors were encountered:
Since #354, the SWIG files have been removed from the python directory (which uses pybind11 now) and moved to the Ruby directory. So there's no more duplication until we decide to add SWIG wrappers for another language.
Since #354, the SWIG files have been removed from the python directory (which uses pybind11 now) and moved to the Ruby directory. So there's no more duplication until we decide to add SWIG wrappers for another language.
this seems to be the case on the ign-math6 branch, but there are still multiple .i and _TEST.rb files in the src/ folder on the main branch:
With the addition of Python interfaces, we now have partial support for 2 scripting languages: ruby and python. Each language was placed into a separate folder for organization purposes, but this means we're repeating the SWIG
.i
files across both directories, i.e.:It would be nice to reduce duplication as much as possible. The strength of SWIG is the multi-language support, so we should strive to write a SWIG file once and get support for multiple languages automatically.
Desired behavior
Have a single SWIG file for each class, which can be reused across all languages.
Alternatives considered
Keep separate files and deal with the extra overhead.
Implementation suggestion
Move the SWIG files to
src/swig
and update CMake to get them from there.Additional context
I see that the SWIG files are slightly different between both directories right now. I imagine there must be good reasons to have differences for each language. I haven't dug into this yet, but I'd hope that SWIG would offer a solution for that use case, maybe using conditionals according to the language?
The text was updated successfully, but these errors were encountered: