ros2 / rosidl_typesupport

Packages which provide the typesupport for ROS messages and services
Apache License 2.0
13 stars 34 forks source link

Change the contract of get_typesupport_handle_function. #102

Open clalancette opened 3 years ago

clalancette commented 3 years ago

Before it would set an RCUTILS error if the typesupport didn't match. But because this is essentially a probe, we change it to not set that on error and instead just return a nullptr. Callers can disambiguate between the probe not finding a typesupport and a real error by checking the return value for nullptr and then checking if rcutils_error_is_set.

Signed-off-by: Chris Lalancette clalancette@openrobotics.org

I went ahead and checked all of the callers of these functions that I could find, and as far as I can tell all of them will be OK with this change. There may be some additional tests that are expecting the old error; besides the ones I fixed here, I didn't find any additional ones. But I didn't run them all, so the full CI run should help track that down.

This change should help resolve some of the errors on CentOS that occurred in CI in combination with https://github.com/ros2/rmw/pull/293 . This is still a draft PR since I'm not 100% sure we want to do this; opinions welcome.

If we merge this, this will fix #100

clalancette commented 3 years ago

Full CI: