yaml: detect and log warning on duplicate keys in snapcraft.yaml
Metadata
Current evaluation
Superseded by PR #3518, merged as 5c2a9d2f8, adding warnings for duplicate keys in snapcraft.yaml.
Resolution: closed superseded
Reason: The duplicate-warnings work continued in PR #3518. Git history shows the original commit 9b60bb1ef, follow-up fixes, and merge commit 5c2a9d2f8 for PR #3518.
Evaluated by: mr-cal-bot
No scores available.
Issue body
A very primitive check to warn if duplicate keys are found in
the snapcraft.yaml. At the moment the file is loaded multiple
times which may result in duplicate warnings (ha ha) which we
need to address in future work. Given that there shouldn't be
duplicates in YAML files, the extra verbosity should be OK.
Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
- [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed superseded | Superseded by PR #3518, merged as 5c2a9d2f8, adding warnings for duplicate keys in snapcraft.yaml. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged duplicate-key detection for snapcraft.yaml; the PR added warnings, with repeated-load duplicate warnings left for future work. | |
| qwen/qwen3.6-35b-a3b | — | — | Duplicate key detection and warnings for snapcraft.yaml were closed without review or merge. The implementation remains abandoned due to zero reviewer engagement and missing CI checks. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without merging. The pull request proposed a primitive warning for duplicate keys in snapcraft.yaml but was abandoned due to potential duplicate warnings and lack of test coverage. |
Update history
No update history recorded yet.
Related work
-
Superseded By:
snapcraft#3518
(confidence 99%)
Merged duplicate-key detection and warning changes in commit 5c2a9d2f8.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3518 yaml: detect and log warning on duplicate keys in snapcraft.yaml (CRAFT-553) | snapcraft | merged | PR merged as 5c2a9d2f8 (commits 9b60bb1ef, 2f80e5313): snapcraft.yaml loading now detects duplicate YAML keys and logs a warning for each duplicate. Re-opened from #3517 for edge publishing. | |
| #1942217 Please check for duplicated yaml keys | snapcraft (launchpad) | closed | Duplicate snapcraft.yaml keys are now detected; warning support merged in canonical/snapcraft#3518 (5c2a9d2f8), with stricter handling from core22 in Snapcraft 7.0. | |
| #1770221 A snapcraft.yaml with more than 1 after: stanza doesn't warn or error | snapcraft (launchpad) | closed | Duplicate `after:` stanzas in `snapcraft.yaml` now trigger a warning instead of silently using the last value. Resolved by enabling duplicate key warnings (commit 2f80e5313). |