Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/linux-arm64-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:

- name: Install test-msgs on Linux
run: |
sudo apt install ros-${{ matrix.ros_distribution }}-test-msgs
sudo apt install ros-${{ matrix.ros_distribution }}-test-msgs ros-${{ matrix.ros_distribution }}-mrpt-msgs
# Adjust dependencies based on Ubuntu version
LIBASOUND_PKG="libasound2"
if grep -q "24.04" /etc/os-release; then
Expand Down
4 changes: 2 additions & 2 deletions rosidl_gen/packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function getPackageName(filePath, amentExecuted) {
}

if (amentExecuted) {
return filePath.match(/\w+\/share\/(\w+)\//)[1];
return filePath.match(/[^/]+\/share\/([^/]+)\//)[1];
}
Comment on lines 35 to 37
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ament path parsing regex is duplicated between getPackageName and getSubFolder. Consider centralizing the parsing (e.g., split on /share/ and then on /) to reduce the chance of future divergence when path rules change again.

Copilot uses AI. Check for mistakes.

let folders = path.parse(filePath).dir.split('/');
Expand All @@ -52,7 +52,7 @@ function getSubFolder(filePath, amentExecuted) {
}

if (amentExecuted) {
return filePath.match(/\w+\/share\/\w+\/(\w+)\//)[1];
return filePath.match(/[^/]+\/share\/[^/]+\/([^/]+)\//)[1];
}
Comment on lines 54 to 56
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a regression test for ament-index paths where the interface subfolder contains a hyphen (e.g., .../share/mrpt_msgs/msg-ros2/Foo.msg). Current test suite exercises findPackagesInDirectory, but doesn’t guarantee coverage for hyphenated subfolders, so this could regress without CI catching it.

Copilot uses AI. Check for mistakes.
// If the |amentExecuted| equals to false, the file's extension will be assigned as
// the name of sub folder.
Expand Down
Loading