Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ament_python does not validate package.xml syntax fully #553

Closed
RMichaelSwan opened this issue Oct 17, 2024 · 1 comment
Closed

ament_python does not validate package.xml syntax fully #553

RMichaelSwan opened this issue Oct 17, 2024 · 1 comment

Comments

@RMichaelSwan
Copy link

RMichaelSwan commented Oct 17, 2024

Unlike ament_cmake, ament_python (perhaps more related to not using CMakelists.txt?) will miss issues in the package.xml file which can have confusing downstream results.

For example, you are allowed to have open tags, incorrect closing tags, and likely many other things without triggering any build errors:

 <description>Some package</other_tag>
 <description>Some package with no closing tag

The resulting behavior is that dependencies are skipped (colcon build --packages-up-to <pkg> won't behave) as they are often after description and other similar tags. A package can seem to build and install correctly, but will not be found by ros2 run or ros2 pkg (though it will still be found by colcon cd).

Replicated on ros humble and jazzy (after spinning my wheels trying to figure out why my package wouldn't launch for a while)

@sloretz
Copy link
Contributor

sloretz commented Oct 28, 2024

Thank you for the report!

If you'd like xmllint tests in your own ament_python package then create a test_xmllint.py file like so: https://github.com/ros2/ros2cli/blob/rolling/ros2pkg/test/test_xmllint.py . Unfortunately we can't add this test automatically in ament_python packages as we can in CMake.

I'm going to close this issue in favor of ros2/ros2cli#944 which asks ros2 pkg create to create test/test_xmllint.py for new packages.

@sloretz sloretz closed this as completed Oct 28, 2024
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

No branches or pull requests

2 participants