rcpputils
rcpputils copied to clipboard
add load_library: Return actual library object, rather than file path as find_library
find_library
shouldn't really return a path, but instead a loaded library.
This would permit things like https://github.com/ros2/rcutils/issues/143 to not have to worry about paths, and could possibly reduce any possibility of ODR by returning currently loaded libraries rather than loading a new one.
find_library
shouldn't really return a path, but instead a loaded library.
The current behavior of only finding the library makes sense for the existing function. That being said introducing another function like load_library
would be an option.
Aye, I didn't mean necessarily that find_library
would keep it's name, so yeah, load_library
would be good.
But I also wanted to imply that, at some point, it would be nice to fully encapsulate the path of a library and the only suggested workflow for handling libraries in ROS2 would be solely through load_library
; then that could admit using already-loaded libraries. Then find_library
would become deprecated (or at least discouraged...).