Skip to content

Match complete interface filenames in ros2 interface show - #1293

Open
vpfkfl753 wants to merge 1 commit into
ros2:rollingfrom
vpfkfl753:fix-interface-name-matching
Open

Match complete interface filenames in ros2 interface show#1293
vpfkfl753 wants to merge 1 commit into
ros2:rollingfrom
vpfkfl753:fix-interface-name-matching

Conversation

@vpfkfl753

Copy link
Copy Markdown

Description

After #1283, interface lookup uses endswith('Foo.msg'), so it can pick OtherFoo.msg before Foo.msg. It also accepts Foo when only OtherFoo exists.

Compare the full filename instead. This keeps support for nonstandard installation directories.

Is this user-facing behavior change?

ros2 interface show displays the requested interface, or reports that it is missing, when another interface name has the same suffix.

Did you use Generative AI?

Yes, OpenAI Codex (GPT-6), for the code change and tests.

Additional Information

Added 12 regression cases using a temporary ament resource index. They cover messages, services and actions in standard and nested directories, with and without the requested interface. All 12 fail before the fix and pass in a ROS 2 Rolling container after it.

Built the package and its test interfaces with colcon. colcon test --packages-select ros2interface passes, including the existing CLI tests and lint checks.

Signed-off-by: vpfkfl753 <vpfkfl753@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant