Poor error reporting for bases earlier than 24
Metadata
Current evaluation
Snapcraft 8.x crashes with a raw traceback (TypeError: 'NoneType' object is not iterable) instead of a friendly error when an empty/None grammar field (e.g. build-packages:) is used on core22 and earlier bases; core24 reports a proper error. Triaged as an enhancement, internal ticket SNAPCRAFT-1186 created, no fix yet.
Suggested action: keep open
Reason: A maintainer (@mr-cal) explicitly triaged this as a real UX bug ('this is not a good user experience... Snapcraft should be more robust when processing grammar') and it was synced to internal ticket SNAPCRAFT-1186, so it is acknowledged and valid. The root cause is still present in the code: snapcraft/parts/grammar.py passes unprocessed_grammar (which is None for an empty key) straight into craft_grammar's GrammarProcessor.process, which does `for section in grammar` and raises TypeError. It is not stale-irrelevant since core22 is still supported and the code path is unchanged.
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.8-27b |
Impact:
45
Quick Win:
27.0
Staleness:
55
Complexity:
40
Confidence:
70
Support Request:
10
|
keep open | Snapcraft 8.x crashes with a raw traceback (TypeError: 'NoneType' object is not iterable) instead of a friendly error when an empty/None grammar field (e.g. build-packages:) is used on core22 and earlier bases; core24 reports a proper error. Triaged as an enhancement, internal ticket SNAPCRAFT-1186 created, no fix yet. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
85
Complexity:
45
Confidence:
75
Support Request:
10
|
keep open | Snapcraft throws a traceback instead of a clear error when using base: core22 with malformed YAML. Triaged as enhancement, acknowledged by maintainer, but inactive for ~1 year. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
85
Complexity:
30
Confidence:
85
Support Request:
0
|
keep open | Snapcraft throws a traceback instead of a clear error when using base: core22 with malformed YAML. Triaged and acknowledged by a maintainer, but inactive for over a year. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
60
Complexity:
35
Confidence:
85
Support Request:
5
|
keep open | Snapcraft throws a traceback instead of a clear error message when parsing malformed YAML with bases older than core24. Triaged and acknowledged as a UX enhancement, awaiting implementation to improve grammar validation error reporting. |
Update history
No update history recorded yet.
Related issues
No related issues found above the similarity threshold.