Fix jazzy interfaces#82
Open
EugenioCollado wants to merge 2 commits into
Open
Conversation
Signed-off-by: Eugenio Collado <eugeniocollado@eprosima.com>
There was a problem hiding this comment.
Pull request overview
Improves robustness of the Micro XRCE-DDS typesupport generators when building newer ROS 2 interface sets in micro-ROS firmware workspaces, by hardening dependency linking and disabling unsupported service event hooks in generated C service typesupport.
Changes:
- Add
find_library()-based fallback to resolve dependency typesupport libraries to absolute paths in the C and C++ generator CMake. - Stop generating/using service event message typesupport hooks for C services (leave event-related fields unset /
NULL).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| rosidl_typesupport_microxrcedds_cpp/cmake/rosidl_typesupport_microxrcedds_cpp_generate_interfaces.cmake | Adds dependency library path resolution fallback before linking dependency typesupport libs. |
| rosidl_typesupport_microxrcedds_c/cmake/rosidl_typesupport_microxrcedds_c_generate_interfaces.cmake | Mirrors the dependency library path resolution fallback for the C generator. |
| rosidl_typesupport_microxrcedds_c/resource/srv__type_support_c.c.em | Removes generation of service event message support and sets event-related service hooks to NULL. |
| rosidl_typesupport_microxrcedds_c/resource/srv__rosidl_typesupport_microxrcedds_c.h.em | Removes emission of event message Micro XRCE-DDS C headers for services. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes two issues in the Micro XRCE-DDS typesupport generators that show up when building recent ROS 2 interface sets inside a micro-ROS firmware workspace.
First, the generated C and C++ Micro XRCE-DDS typesupport libraries could fail to link against dependency typesupport libraries when those dependencies exported non-absolute library names. The previous logic relied on target_link_libraries() receiving names that CMake could resolve as real linkable artifacts, which is not always true in this workflow. This PR keeps the existing exported values when they are already absolute paths, and otherwise resolves them with a small find_library() fallback using the dependency package prefix.
Second, the C service templates were generating event-related service typesupport hooks. That path pulls in service_msgs/msg/ServiceEventInfo, which is currently outside the supported Micro XRCE-DDS service event flow and causes link failures in micro-ROS builds. This PR disables event-specific hooks in the generated Micro XRCE-DDS C service typesupport and leaves those fields unset.
These changes are intentionally small and focused on making the Micro XRCE-DDS generators robust in micro-ROS workspaces without changing the normal successful path when dependencies are already exported correctly.
What changed
Add a safer dependency library resolution fallback in:
Stop generating unsupported service event hooks in:
Why
This fixes firmware workspace build failures affecting action and service-heavy interface packages such as example_interfaces, test_msgs, and std_srvs.