feat: add funcs part_has_slices and part_has_chisel_as_build_snap
Metadata
Current evaluation
Merged PR #914 in commit 1062a468, adding part_has_slices and part_has_chisel_as_build_snap for inspecting part dictionaries without constructing PartSpec objects.
Resolution: closed resolved
Reason: The pull request was merged into craft-parts as commit 1062a468, resolving the request with the two utility functions and tests.
Evaluated by: mr-cal-bot
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 |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #914 in commit 1062a468, adding part_has_slices and part_has_chisel_as_build_snap for inspecting part dictionaries without constructing PartSpec objects. | |
| stealth/space-bunny-alpha | — | closed resolved | PR #914 by linostar merged (commit 1062a468), adding exported helpers part_has_slices and part_has_chisel_as_build_snap to craft_parts/parts.py and __init__.py, plus unit tests and a changelog entry. Part of the chisel-as-build-snap work of #904. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #914 in commit 1062a468, adding part_has_slices and part_has_chisel_as_build_snap so Rockcraft can inspect part dictionaries without creating PartSpec objects. | |
| 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 work
-
Related To:
canonical/craft-parts#904
(confidence 95%)
Introduced the chisel build-snap behavior exposed by the new helper.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #649 Install chisel if parts use slices | craft-parts | closed | Implemented as requested: PR #904 (commit 941164e1) makes craft-parts append chisel@latest/stable to extra build snaps when any part has stage-packages/build-packages slices. Later #914 added part_has_chisel_as_build_snap detection. | |
| #637 feat: add a utility function that determines whether a part has slices | craft-parts | closed | PR #637 (part_has_slices utility) sat unmerged with change requests; author closed it 2024-11-20 in favor of #904 (merged 941164e1), with the helpers finally landing in #914 (commit 1062a468). |