colcon / colcon-ros

Extension for colcon to support ROS packages
http://colcon.readthedocs.io
Apache License 2.0
13 stars 26 forks source link

Invalid package.xml suppresses error and silently succeeds if setup.py present #146

Open emersonknapp opened 1 year ago

emersonknapp commented 1 year ago

If you have a package with both package.xml and setup.py - if the package.xml has invalid syntax, then colcon build silently falls back to a regular python build type, without even printing a warning.

I would expect this to actually fail the build, as it's a pretty serious error condition with confusing side effects. Instead it's only logged as a debug.

# COLCON_LOG_LEVEL=debug colcon build --packages-select mypkg
...
[0.216s] DEBUG:colcon.colcon_core.package_identification:Failed to parse potential ROS package manifest in'src/mypkg': Error(s) in package 'src/mypkg/package.xml':                                                                                     
The manifest contains invalid XML:                                                                                                                                                                                                                            
mismatched tag: line 4, column 12  
...
# echo $?
0