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

Colcon build silent package.xml parse errors #153

Closed
LeroyR opened this issue Nov 16, 2023 · 1 comment
Closed

Colcon build silent package.xml parse errors #153

LeroyR opened this issue Nov 16, 2023 · 1 comment

Comments

@LeroyR
Copy link

LeroyR commented Nov 16, 2023

When using "broken" package.xml (missing maintainer field)
e.g.:

<package format="2">
  <name>package_2</name>
  <version>0.0.0</version>
  <description>
  This package provides foo capability.
  </description>
  <license>TODO</license>

  <buildtool_depend>catkin</buildtool_depend>
  <depend>package_1</depend>

</package>

while using ros1-style find_package(catkin REQUIRED package_1), colcon is not able to parse the dependencies from CMakeLists and silently fails to parse them from package.xml.
colcon will thus build both packages simultaneously:

Starting >>> package_1
Starting >>> package_2                  
--- stderr: package_2                                                              
  ...
  Could not find a package configuration file provided by "package_1"
  ...
---
Failed   <<< package_2 [0.95s, exited with code 1]
Aborted  <<< package_1 [1.30s]    

Adding the maintainer, colcon is able to parse the dependencies from package.xml and build packages in the correct order.

We found the parsing error (from catkin) only by manually building the packages:

colcon build --packages-select package_1
source install/setup.bash 
colcon build --packages-select package_2
Starting >>> package_2
--- stderr: package_2           
...
catkin_pkg.package.InvalidPackage: Error(s) in package '/home/robocup-adm/tmp/colcon_test/package_2/package.xml':
Package 'package_2' must declare at least one maintainer  
...      

I think colcon should print a warning if package.xml is found but fails to parse.

@cottsay cottsay transferred this issue from colcon/colcon-core Feb 2, 2024
@cottsay
Copy link
Member

cottsay commented Feb 8, 2024

Duplicate of #146

@cottsay cottsay marked this as a duplicate of #146 Feb 8, 2024
@cottsay cottsay closed this as completed Feb 8, 2024
@cottsay cottsay closed this as not planned Won't fix, can't repro, duplicate, stale Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants