Make sure we don't try to include an empty set
Metadata
Current evaluation
Merged a fix preventing snapcraft cleanbuild crashes when parts are null outside the container. The patch adds a guard to skip empty sets. Reviewers suggested lazy loading improvements but approved the change.
Suggested action: —
No scores available.
Issue body
This happens when snapcraft loads the configuration in cleanbuild to
retrieve the name and some other metadata. It's too early to resolve the
parts and they are null outside of the container.
-----
- [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/)?
- [ ] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?
- [ ] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh unit`? < some tests fail but they also failed before as well
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged a fix preventing snapcraft cleanbuild crashes when parts are null outside the container. The patch adds a guard to skip empty sets. Reviewers suggested lazy loading improvements but approved the change. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix preventing snapcraft from attempting to include an empty set when loading configuration too early during cleanbuild. Reviewers suggested lazy loading improvements, but the patch was accepted and merged. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix preventing snapcraft from crashing during cleanbuild config loading due to null parts and empty sets. Reviewers suggested lazy loading or architectural changes, but the patch was accepted and merged without additional tests. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1372 cli: Containerbuild clean | snapcraft | merged | Merged to add a unit test and fix for the SNAPCRAFT_CONTAINER_BUILDS=1 clean command. Approved after reviewer testing issues were addressed and a related bug report was linked. |