← Back to issue list

refactor(parts): separate yaml parsing from base errors

View original Github issue

Metadata

Project
snapcraft
Number
#4342
Type
pull request
State
merged
Author
mr-cal
Labels
Created
Updated
Closed

Current evaluation

Merged into main after passing CI and receiving two approvals. The refactor separates YAML parsing from base errors to allow base validation without raising exceptions. No functional changes were made, and coverage increased by 0.01%.

Suggested action:

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `make lint`? - [x] Have you successfully run `pytest tests/unit`? ----- No functional changes. Another precursory refactor for #4318 in which I need to load a `snapcraft.yaml` and check the base without raising an error. (CRAFT-1972)

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged into main after passing CI and receiving two approvals. The refactor separates YAML parsing from base errors to allow base validation without raising exceptions. No functional changes were made, and coverage increased by 0.01%.
qwen3.6-35b-a3b-mtp-q6 Merged into main. Refactored YAML parsing to separate it from base errors, preparing for issue #4318 to load snapcraft.yaml without raising errors. No functional changes. Diff achieved 100% test coverage.
qwen3.6-35b-a3b-mtp-q6 Merged into main. Separates YAML parsing from base errors with no functional changes. Prepares the codebase for issue #4318 by allowing snapcraft.yaml loading without raising errors. Passed all checks with 100% diff coverage.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#4338 refactor(parts): move yaml utils out of lifecycle snapcraft merged Merged into main after approval and passing CI. Relocated four YAML utility functions from the lifecycle module to yaml_utils. No functional changes. Prepares codebase for related work.
76%
#3669 parts: raise error when duplicate keys are used snapcraft merged Merged. Refactored YAML loading into a new yaml_utils module and forward-ported safe loading to raise errors for duplicate keys in parts configuration. Approved by reviewer and passed CI.
72%
#1004 fix: unhelpful error message when `base` is missing from YAML rockcraft merged Merged a fix that improves the error message when the base field is missing from YAML, resolving issue 997. Approved by two reviewers, the PR passed CI checks aside from unrelated known failures, and was successfully integrated.
71%