Support craft_parts.PartsError as a complex object
Metadata
Current evaluation
The craft-application migration superseded Charmcraft-specific PartsError-to-CraftError conversion; migration cleanup later landed in canonical/charmcraft#1704.
Resolution: closed superseded
Reason: Maintainer @lengau said the support would arrive with the craft-application migration, and the issue was closed without a dedicated PartsError conversion. Related migration cleanup landed in commit cfc37020 via canonical/charmcraft#1704.
Evaluated by: mr-cal-bot
No scores available.
Issue body
The Craft Parts library raises several errors that inherit its `PartsError`, whose `__str__` method just puts together the error message, details and resolution hints in several lines (concatenates all strings with `\n`). This looks ugly when we show the error.
We need to get that object and build an also complex CraftError from the different `PartsError` attributes. Probably the simplest place to do this in a couple of points in `./charmcraft/parts.py`
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed superseded | The craft-application migration superseded Charmcraft-specific PartsError-to-CraftError conversion; migration cleanup later landed in canonical/charmcraft#1704. | |
| stealth/space-bunny-alpha | — | closed superseded | Superseded by Charmcraft’s craft-application migration, which centralizes structured PartsError-to-CraftError conversion in craft-application. | |
| stealth/space-bunny-alpha | — | closed superseded | Closed as superseded by the craft-application migration, which was intended to handle PartsError formatting instead of adding Charmcraft-specific conversion. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Superseded. Error formatting for craft_parts.PartsError will be handled during the craft-application migration instead of implementing custom error handling in charmcraft. | |
| qwen/qwen3.6-35b-a3b | — | — | Superseded by the craft-application migration. Improved PartsError formatting will be addressed during that migration rather than implemented directly in charmcraft. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed as superseded by the craft-application migration. Error formatting improvements for craft_parts.PartsError will be addressed during that transition instead of implementing custom handling in charmcraft/parts.py. |
Update history
No update history recorded yet.
Related work
-
Superseded By:
canonical/charmcraft#1704
(confidence 88%)
Craft-application migration cleanup associated with the approach named in the closing discussion.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #107 craft_parts: export PartsError in base package (CRAFT-456) | craft-parts | merged | Merged PR #107 (commit 23fbe96c) exposed PartsError from the craft_parts base package, allowing applications to catch it without importing the internal errors module. |