ROS V2 plugins: resolve conditional dependencies
Metadata
Current evaluation
Merged PR #3570 in commit 1fa5484b9, enabling ROS V2 plugins to resolve package.xml dependencies conditioned on ROS_VERSION, ROS_DISTRO, or ROS_PYTHON_VERSION.
Resolution: closed resolved
Reason: PR #3570 was merged into master as 1fa5484b9. Its changes added conditional dependency resolution for ROS V2 plugins and updated spread tests.
Evaluated by: mr-cal-bot
No scores available.
Issue body
This PR enables ROS conditional dependencies in `package.xml` such as e.g.
```xml
<build_depend condition="$ROS_VERSION == 1">roscpp</build_depend>
<build_depend condition="$ROS_VERSION == 2">rclcpp</build_depend>
```
It only enables conditions based on "ROS_VERSION", "ROS_DISTRO" and "ROS_PYTHON_VERSION" which are the most commonly encountered.
This is the plugin V2 equivalent of #3313.
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3570 in commit 1fa5484b9, enabling ROS V2 plugins to resolve package.xml dependencies conditioned on ROS_VERSION, ROS_DISTRO, or ROS_PYTHON_VERSION. | |
| stealth/space-bunny-alpha | — | closed resolved | PR #3570 merged to master in commit 1fa5484b9, adding conditional package.xml dependency support for ROS_VERSION, ROS_DISTRO, and ROS_PYTHON_VERSION in ROS V2 plugins. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged to master, enabling conditional dependencies in ROS V2 plugins for ROS_VERSION, ROS_DISTRO, and ROS_PYTHON_VERSION. Approved after CI passed and spread tests were updated to cover the feature. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into master. Enables ROS conditional dependency resolution in package.xml for ROS_VERSION, ROS_DISTRO, and ROS_PYTHON_VERSION. Added functional spread tests per reviewer request, increasing coverage by 0.03%. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/snapcraft#3313
(confidence 100%)
The merged ROS plugin V1 implementation of conditional package.xml dependency resolution; #3570 is its plugin V2 equivalent.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3313 Set ROS_VERSION for rosdep in plugins v1 | snapcraft | merged | Merged PR #3313 in commit 1d1b50c81, setting ROS_VERSION for rosdep in plugins v1 so package.xml supports ROS 1/2 conditional dependencies. | |
| #3536 ROS plugins v2 misc fixes | snapcraft | merged | Merged ROS v2 plugin fixes to detect local ROS packages in the part install or underlay and skip rosdep resolution for them, with added core20 spread coverage. | |
| #3664 ROS plugins v2: respect source-subdir key | snapcraft | merged | Merged PR #3664, with commit 09eb744e5, made ROS v2 Colcon/catkin plugins respect source-subdir, removed a redundant dependency, and added subdirectory tests. | |
| #3566 ROS 2 plugins v2 misc fixes | snapcraft | merged | Merged #3566 via 6f80a4cee, fixing ROS 2 v2 install paths and local-package staging, with new spread tests. |