feat: add funcs part_has_slices and part_has_chisel_as_build_snap
Metadata
Current evaluation
Merged part_has_slices and part_has_chisel_as_build_snap to check part data for slices and chisel in build-snaps. Approved by two reviewers and passed CI, the +29/-1 change aids Rockcraft by avoiding PartSpec conversions.
Suggested action: —
No scores available.
Issue body
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
This is add two utility functions `part_has_slices` and `part_has_chisel_as_build_snap` that takes a dictionary (representing a part's data) as an argument and determine whether the part data has slices and whether it has chisel in build-snaps, respectively.
Those functions are needed in Rockcraft, where we deal with part data dictionaries often, and converting those dictionaries to PartSpec objects will require extra code that has been already implemented internally in craft-parts.
Related work: #904
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged part_has_slices and part_has_chisel_as_build_snap to check part data for slices and chisel in build-snaps. Approved by two reviewers and passed CI, the +29/-1 change aids Rockcraft by avoiding PartSpec conversions. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Added part_has_slices and part_has_chisel_as_build_snap to inspect part data for slices and chisel in build-snaps. Allows Rockcraft to reuse craft-parts logic without converting dictionaries to PartSpec objects. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1717 feat(part): add build-slices model | craft-parts | closed | Merged the addition of a build-slices Part property listing Chisel slices for the build root. The change introduces a new feature flag and validation logic. Approved by a reviewer and passed all CI checks. | |
| #904 feat: add chisel as a build snap when stage-packages contain slices | craft-parts | merged | Merged. Conditionally installs chisel as a build snap only when stage-packages contain slices and no part already declares it, preventing unnecessary installation in the Rockcraft snap. Approved by two reviewers and passed CI. | |
| #637 feat: add a utility function that determines whether a part has slices | craft-parts | closed | Closed in favor of PR #904. The utility function to detect part slices was superseded by an alternative implementation. Review feedback was incorporated, but the changes were ultimately consolidated into the referenced pull request. |