Colcon plugin: use release build by default
Metadata
Current evaluation
Merged changes to default the Colcon plugin to Release builds, reducing snap executable size and debug symbols. Approved by reviewers, passed CI, and declined backporting to 7.x.
Suggested action: —
No scores available.
Issue body
- [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 `make lint`?
But I got a strange error even if everything seems ok or 10/10
- [X] Have you successfully run `pytest tests/unit`?
But I failed one test with the same issue as reported here https://github.com/snapcore/snapcraft/pull/3810
-----
Normally Colcon does not set any build flags and leaves the choice to the user, meaning the default value is empty and uses the default cmake configuration for debug symbols and optimization.
Inside snaps the executables are not supposed to be debugged and should be as optimized as possible so we want the default to be "Release" explicitly, unless the user overrides it intentionally in their snapcraft.yaml
This PR has been tested by creating snaps of the simple ros2-talker-listener snap with different debug levels, either default or user-customized.
The results for the talker executable show a clear reduction in size and in the number of symbols.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged changes to default the Colcon plugin to Release builds, reducing snap executable size and debug symbols. Approved by reviewers, passed CI, and declined backporting to 7.x. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Updates the Colcon plugin to default to Release builds for snaps, reducing binary size and debug symbols. Maintainers approved the change after passing code coverage checks and decided against backporting to version 7.x. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged changes to the Colcon plugin to default to Release builds for snaps, reducing executable size and debug symbols. Tests passed and the change was not backported to 7.x. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2486 colcon plugin: support build-time chaining | snapcraft | merged | Merged PR fixing the colcon plugin to support build-time chaining. Resolves a regression by relying on setup files instead of environment variables, addressing Launchpad bug #1816565. Approved and passed CI. | |
| #2456 plugins: add colcon plugin | snapcraft | merged | Merged the colcon plugin for ROS2 builds, resolving LP: #1805213. Added as a beta feature, the change was approved by two reviewers, passed CI with 100% diff coverage, and introduced 2120 lines across 16 files. |