ros2 / rosidl

Packages which provide the ROS IDL (.msg) definition and code generation.
Apache License 2.0
76 stars 125 forks source link

Fix same named types overriding typesources #759

Closed emersonknapp closed 1 year ago

emersonknapp commented 1 year ago

When two interface types in the same package had the same name stem (e.g. msg/Empty.msg and srv/Empty.srv), both types would receive the same TypeSources in their generated description. Can be considered undefined behavior, but it's processed alphabetically so the msg consistently received the srv sources.

This fixes it, adds a regression test, and adds a new basic test for .idl files just to make sure that continues to work OK. Bug exists in Iron, this would need to be backported.

emersonknapp commented 1 year ago

Pulls: ros2/rosidl#759 Gist: https://gist.githubusercontent.com/emersonknapp/67c942266b93571ebb90a33aef5d2ddc/raw/a35bc75291715af8472773be5c927306a1474c62/ros2.repos BUILD args: TEST args: ROS Distro: rolling Job: ci_launcher ci_launcher ran: https://ci.ros2.org/job/ci_launcher/12433

emersonknapp commented 1 year ago

@mergifyio backport iron

mergify[bot] commented 1 year ago

backport iron

✅ Backports have been created

* [#760 Fix same named types overriding typesources (backport #759)](https://github.com/ros2/rosidl/pull/760) has been created for branch `iron`