-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add ign plugin --info
to print plugin info
#32
Conversation
Given a library file, `ign plugin --info` will print the names of plugins exported within that library and the interfaces exposed. The --verbose flag can provide extra information. Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you consider adding a new component for the command line tools, so that users of the plugin loader aren't required to bring ign-tools
? The Ruby dependency is often undesired.
Also follow suggestions from review comments. Signed-off-by: Steve Peters <[email protected]>
From a build perspective, The only impact it has on the loader is adding one symbol to the loader component library, but that seems small to me compared to the extra effort of adding another component. I think we could create a separate debian package in the metadata to install the |
Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
There are some issues with loading plugins from `ign` when run with /usr/bin/ruby on macOS due to System Integrity Protection. If a plugin ending in ".dylib" fails to load, print a workaround suggestion using ruby from brew. Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
Ok, I think this could be a good separation. So just to clarify, this will be the situation, right?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me! I tried it with plugins from several libraries.
@@ -3,6 +3,11 @@ | |||
# "tests" variable | |||
ign_get_libsources_and_unittests(sources tests) | |||
|
|||
# Disable ign_TEST if ignition-tools is not found | |||
if (MSVC OR NOT IGNITION-TOOLS_BINARY_DIRS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we open a ticket to track command line support on Windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think gazebosim/gz-tools#7 will help with windows support eventually
@scpeters , is this PR pending anything else? |
hm...I think I was waiting to see how gazebosim/gz-transport#216 turned out, but I guess we would need I think this could be fine as is since I don't think we would add |
Yeah we could do the current approach on |
Oops, this broke downstream CI: https://build.osrfoundation.org/job/ign_gui-pr-win/625/console
|
I just noticed this. I'll revert unless I find a quick fix |
This adds an
ign plugin --info
command to the loader component that attempts to load a specified shared library and print information about the plugins and interfaces in that file. My motivation for this is to support development of ignition-physics Implementation plugins, though it is useful for other plugins as well. I've addedlibignition-tools-dev
to thepackages.apt
in this PR and to the homebrew formula in osrf/homebrew-simulation#1213.For example, given a path to the DummyPlugins shared library used in unit tests for the loader component,
ign plugin --info --plugin lib/libIGNDummyPlugins.dylib
generates the following output.More verbose output from the Loader::PrettyStr() function can be printed with the
--verbose
flag.