fix: do not process non-grammar keywords
Metadata
Current evaluation
Merged #330 via commit 6a302635, skipping grammar processing for non-grammar keys and preventing invalid-list errors such as meson-parameters.
Resolution: closed resolved
Reason: PR #330 was merged as commit 6a302635. Its implementation skips keys not listed as grammar-aware, fixing the regression introduced by #296.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [x] Have you followed the guidelines for contributing?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you successfully run `tox`?
-----
Another grammar-related fix.
This is caused by [this](https://github.com/canonical/craft-application/pull/296/files#diff-1ef92b4ea98b9954fdb242a2697c47c5e275c45e703e54995980b2307da3187aR81) line augmenting data for non-grammar keywords.
It was causing errors like this:
```
Bad snapcraft.yaml content:
- value is not a valid list (in field 'parts.gnome-calculator.meson-parameters')
Full execution log: '/root/.local/state/snapcraft/log/snapcraft-20240429-201308.751985.log'
```
My solution is not to process grammar for non-grammar keywords.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged #330 via commit 6a302635, skipping grammar processing for non-grammar keys and preventing invalid-list errors such as meson-parameters. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged craft-application#330 to skip grammar processing for non-grammar keywords, preventing invalid list errors on fields such as parts.*.meson-parameters. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged a fix preventing the grammar processor from incorrectly handling non-grammar keywords, resolving snapcraft.yaml parsing errors. The change skips grammar processing for non-grammar fields, approved by reviewers and passing CI. |
Update history
No update history recorded yet.
Related work
-
Caused By:
canonical/craft-application#296
(confidence 99%)
The PR body identifies #296 as the change that began augmenting data for non-grammar keywords.
-
Related To:
canonical/snapcraft#4768
(confidence 95%)
The author reported testing the fix with Snapcraft through this pull request.
Related issues
No related issues found above the similarity threshold.