← Back to issue list

Support yaml merge tags

View original Github issue

Metadata

Project
snapcraft
Number
#1384
Type
pull request
State
merged
Author
timsueberkrueb
Labels
Created
Updated
Closed

Current evaluation

Merged. Fixes snapcraft's YAML loader to support merge tags. Custom dict constructors previously caused parsing failures. The update restores standard PyYAML merge tag handling, approved by two reviewers and passing CI.

Suggested action:

No scores available.

Issue body

The current yaml loading implementation in snapcraft doesn't support yaml merge tags. Example: ```yaml parts: base: &base plugin: nil source: . my-part: plugin: dump <<: *base ``` Snapcraft fails with the following error message: ``` could not determine a constructor for the tag 'tag:yaml.org,2002:merge' in "snap/snapcraft.yaml", line 20, column 5 ``` Would you like me to create a test case for this? If yes, where? Thanks in advance. LP: [#1700765](https://bugs.launchpad.net/snapcraft/+bug/1700765)

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged. Fixes snapcraft's YAML loader to support merge tags. Custom dict constructors previously caused parsing failures. The update restores standard PyYAML merge tag handling, approved by two reviewers and passing CI.
qwen3.6-35b-a3b-mtp-q6 Merged. Resolved snapcraft's YAML parsing failure by updating its custom dict constructor to properly support PyYAML merge tags, enabling <<: *anchor syntax in configuration files.
qwen3.6-35b-a3b-mtp-q6 Merged update to snapcraft's YAML loader to support merge tags. The custom dict constructor from PR #756 previously rejected the <<: syntax. The fix updates YAML handling to correctly parse merge tags, resolving the constructor error.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2517 project: ensure yaml load returns a dictionary snapcraft merged Merged fix for SNAPCRAFT-JQ ensuring yaml.load returns an empty dictionary instead of None for empty files. Prevents validation crashes when Snapcraft processes empty YAML. Approved by reviewer and passed all CI checks.
71%
#1700765 yaml merge tags are not supported snapcraft (launchpad) closed Abandoned without resolution. The request to add YAML merge tag support to snapcraft was closed due to inactivity, leaving the feature unimplemented.
71%