← Back to issue list

fix: do not process non-grammar keywords

View original Github issue

Metadata

Project
craft-application
Number
#330
Type
pull request
State
merged
Author
mr-cal
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action:

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
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.
qwen3.6-35b-a3b-mtp-q6 Merged a bugfix that skips grammar processing for non-grammar keywords, resolving snapcraft.yaml validation errors. The maintainer approved the change despite acknowledged code complexity and unrelated CI failures.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3 grammar: import from Snapcraft (CRAFT-818) craft-grammar merged Merged import of grammar processing logic from Snapcraft. Refactored grammarProcessor and transformer signatures to remove Snapcraft coupling and enforce kwargs. Updated linting and type checking tooling. Approved and passed CI.
72%
#319 fix: apply yaml transforms before grammar craft-application merged Merged a fix to apply extra_yaml_transforms before grammar processing. Backports #316 to hotfix/2.6, ensuring advanced grammar additions work correctly. Approved by two reviewers and passed CI.
70%