ros2 / domain_bridge

Bridge communication across different ROS 2 domains.
Apache License 2.0
52 stars 12 forks source link

Do not associate test library with export #61

Closed jacobperron closed 2 years ago

jacobperron commented 2 years ago

Otherwise, downstream targets will try to link against it. This can cause issues linking because the test component library is not exporting dependencies (e.g. test_msgs).

jacobperron commented 2 years ago

hmm, looks like this patch doesn't work. I guess it only appeared to work locally because I forgot to clean my build folder.

Seems like there's just not a convenient way to write test components without installing them (probably something we could improve in rclcpp_components). For example, rclcpp_components works around the issue by not calling rclcpp_components_register_node and mocking an ament index:

https://github.com/ros2/rclcpp/blob/e0e96681d9f0f5bd1f220b3d3107a612dad8321b/rclcpp_components/CMakeLists.txt#L83-L111

:slightly_frowning_face:

jacobperron commented 2 years ago

Removing the association with the export fixes the issue for me (c86d28e).

jacobperron commented 2 years ago

I'm not sure why the GitHub workflow is suddenly using Python 2.7... With Rpr passing, I'm going to merge this. I'll play around with the GitHub workflow separately.

jacobperron commented 2 years ago

IIUC, the GitHub workflow requires some changes to rosidl_parser to become available. It should hopefully resolve itself once a Rolling sync to testing happens: https://build.ros2.org/job/Rrel_sync-packages-to-testing_focal_amd64/