Repository navigation
Do not associate test library with export - #61
Conversation
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). Signed-off-by: Jacob Perron <[email protected]>
|
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 🙁 |
This helps avoid linking issues downstream. Long term, it would probably be best to avoid installing the library entirely, but writing tests becomes more complex. Signed-off-by: Jacob Perron <[email protected]>
|
Removing the association with the export fixes the issue for me (c86d28e). |
| EXECUTABLE test_component) | ||
|
|
||
| install(TARGETS ${PROJECT_NAME}_test_component_lib | ||
| EXPORT export_${PROJECT_NAME} |
There was a problem hiding this comment.
I don't know why this was originally exported, but it could also be exported as export_${PROJECT_NAME}_test or something to prevent accidental linking against? Although to be fair, there isn't a reason to install (or export) the test library.
There was a problem hiding this comment.
yeah, installing or exporting the library sounds like a bad idea.
The workaround that rclcpp_components is using looks better, though this seems fine to solve the CI issues.
|
I'm not sure why the GitHub workflow is suddenly using Python 2.7... |
|
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/ |
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).