Open rotu opened 4 years ago
I am not sure this kind of "catch all" approach to uninstall multiple packages is going to work.
First, the --cmake-target uninstall
option will only uninstall CMake packages. Any other package type would still be build normally.
Second, as you discovered the packages would need to be processed in reverse topological order. A new option to reverse the order could probably be added - I am just not sure that would be worth the effort / complexity.
If it's worth having an uninstall feature, it's worth having one that actually works. This is an excellent illustration of why it doesn't fit into the concept of a build target. Maybe uninstall should instead be exposed as part of the colcon build interface?
Please feel free to propose alternatives. I don't think I will have time to work on this functionality since I don't have a use case for it.
I don’t have a use case for it either. I’m in favor of quietly deprecating this footgun by disabling it in ament_cmake until it can be properly attended to.
I’m in favor of quietly deprecating this footgun by disabling it in ament_cmake
The functionality provided by ament_cmake
is useful on its own when e.g. used without colcon
(calling cmake
/ make install
/ make uninstall
directly). Just because colcon
doesn't have a process for uninstall multiple packages is not an argument for removing the functionality from ament_cmake
.
That makes sense. I was under the assumption that the ament build tools were not really used outside of catkin.
While ament_uninstall is supposedly provided for uninstalling packages, often doing so results in a crash as
colcon
processes the packages in topological dependency order, removing build-time dependencies that later packages need: