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

Ruby dependencies may be undesirable? #274

Open
EricCousineau-TRI opened this issue May 9, 2020 · 5 comments
Open

Ruby dependencies may be undesirable? #274

EricCousineau-TRI opened this issue May 9, 2020 · 5 comments

Comments

@EricCousineau-TRI
Copy link
Collaborator

EricCousineau-TRI commented May 9, 2020

Filing this issue based on:
RobotLocomotion/drake#13231
ros/urdfdom_headers#59 (comment)

I'm not proposing any action yet, but rather to gather use cases where Ruby is high-overhead.
Ultimately, this may get closed out as not fixable, but good to have the convo here anywho.

(I assume there are complaints on ROS Answers + Gazebo Community as well; at some point, it would be nice to skim and collect those.)

@EricCousineau-TRI
Copy link
Collaborator Author

EricCousineau-TRI commented May 9, 2020

From ros/urdfdom_headers#59 (comment):

[...] but unfortunately it depends on Ruby [...]

@traversaro Just to check, what would a more ideal dependency be? Pure C++, Python, a more lightweight Ruby implementation, ...?

From prior conversations, I believe most Ignition tools use Ruby:
RobotLocomotion/drake#13231 (comment)
https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/434/page/1#comment-65236228

@traversaro
Copy link
Contributor

traversaro commented May 9, 2020

[...] but unfortunately it depends on Ruby [...]

@traversaro Just to check, what would a more ideal dependency be? Pure C++, Python, a more lightweight Ruby implementation, ...?

Both C++ or Python would be much more convenient from the point of view of macOS/Windows use. Having a dependency on Ruby is relatively fine as long you just use as an interpreter for processing files. If instead you want to load in a Ruby script a plugin written in C++ you will have problems if your plugin has been compiled with a C++ toolchain different from the one with which the Ruby interpreter has been compiled. You can find a few related discussions in:

In theory you could have the same problem in Python as well, but in practice (at least on Windows) the official Python Windows interpreter uses the same C++ ABI of Visual Studio, that is the compiler used
by most projects, and even if you want to use MinGW, getting or compiling a Python interpreter for MinGW is relatively easy.

@EricCousineau-TRI
Copy link
Collaborator Author

Gotcha, thanks for the explanation!
And just to make sure I understand this workflow:

If instead you want to load in a Ruby script a plugin written in C++ [...]

Is this most directly addressed by gazebosim/gz-tools#7, where ign is the Ruby script that you mention which loads subcommands as shared library functions (rather than doing separate binaries like git, rosrun, etc. do for some of their more complex subcommands)?

@traversaro
Copy link
Contributor

traversaro commented May 9, 2020

If instead you want to load in a Ruby script a plugin written in C++ [...]

Is this most directly addressed by ignitionrobotics/ign-tools#7, where ign is the Ruby script that you mention which loads subcommands as shared library functions (rather than doing separate binaries like git, rosrun, etc. do for some of their more complex subcommands)?

That is correct.

@traversaro
Copy link
Contributor

Another example in which the Ruby (build) dependency is cumbersome: conda-forge/libsdformat-feedstock#9 . TL;DR: conda-forge removed ruby from their CI machine, and now the only "clean" way forward is to add a ruby port on conda-forge that builds on Windows.

Bi0T1N added a commit to Bi0T1N/sdformat that referenced this issue Mar 17, 2022
- removes Ruby dependency (see gazebosim#274)
- improvements for cpplint checks (e.g. copyright header)

Signed-off-by: Bi0T1N <[email protected]>
Bi0T1N added a commit to Bi0T1N/sdformat that referenced this issue Jul 1, 2022
- removes Ruby dependency (see gazebosim#274)
- improvements for cpplint checks (e.g. copyright header)

Signed-off-by: Bi0T1N <[email protected]>
Bi0T1N added a commit to Bi0T1N/sdformat that referenced this issue Aug 26, 2022
- removes Ruby dependency (see gazebosim#274)
- improvements for cpplint checks (e.g. copyright header)

Signed-off-by: Bi0T1N <[email protected]>
Bi0T1N added a commit to Bi0T1N/sdformat that referenced this issue Dec 17, 2022
- removes Ruby dependency (see gazebosim#274)
- improvements for cpplint checks (e.g. copyright header)

Signed-off-by: Bi0T1N <[email protected]>
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