-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[feature] CI job to verify dependencies package.xml #29685
Comments
First-time releases are definitely an area where dependency details can trip up initial package releases. 1. I also think an independent build tool could do it but starting from colcon will save reimplementation of lots of package handling and task creation effort. Scanning and comparing CMakeLists.txt and package.xml wouldn't be a panacea since as you point out it would only work for packages where the find_package name matches the dependency key name. Further, it wouldn't work for packages that use build systems other than cmake or ament_cmake (of which only ament_python is currently supported by the build farm) but it would help catch undeclared dependencies on other ROS packages that are installed as system packages and that's no small thing. A static check like that would be implementable as a linter and integrated with the ament_lint workflow so that's definitely the approach I would lean towards. |
I agree that doing per-package CI would be probably not practical. I primarily recommend just a CI job to scan the cmakelists / package.xml file to take care of the ros packages (since their keys will match The 3 places I could see this having immediate value:
|
+1 for adding more checking in
Whatever the solution would be, I think the functionality will be useful in many different contexts, not just for rosdistro repo. So I +1 for adding such a functionality in a standalone tool like it's been discussed above already. |
If you'd like to implement the basic checks such as making sure that a found package which is a ROS package is at least in one of the dependencies of the package.xml I think that's a good idea. However that really should just be a dependency linter that if robust could be added to our default set of linters. If not it's just a linter that can be either manually added or run by the developer. The only way to really check the dependencies and know that they're going to build which is what we would need to do to have a gating check is significantly complex. I wrote up a bit of an analysis on a similar discourse thread a few months ago. |
This is more a smoke / sanity check since that is what has caused many of my personal issues with re-releasing because of dependencies missing. I can't speak on the maintainers' side about how often this is the root cause of issues in the build farm, but the impression I am under is it is fairly trial and error for many others. The general strategy I would take on this:
Since only ROS packages are in Would that be sensible? |
It doesn't have a ROS 2 compatible version right now afaik, but "check |
Hi, feel free to close if you feel this is more on the developer (which is a totally fair assessment).
In my experience releasing packages, new packages typically fail the build farm the first time (or two), usually due to dependencies not being correctly called out in the package.xmls for the isolated builds. There are a couple of other common failure modes, but I have to say that this probably accounts for 75% of my re-releases.
The suggestion is to add a CI job to do some simple cross checking between the cmakelists and the package.xml making sure that any ROS package
find_package()
argument has a matchingtest_depend
depend
exec_depend
orbuild_depend
call. Obviously this doesn't hold for external libraries inrosdep
where the rosdep keys may not match thefind_package()
name, but would still probably catch a number of issues before ever hitting the build farm stage. I think this would overall save alot of man-power on maintaining this repo if folks can resolve these issues on their own.An alternative would be instead to add a new
ament_XYZ
test for this type of thing as well to be a more general solution, so that even local developer builds would fail if dependencies weren't correctly called out. I think there's a few places this could potentially live and I'd be open to discussing the right location.Let me know what you think!
The text was updated successfully, but these errors were encountered: