yaml: detect and log warning on duplicate keys in snapcraft.yaml (CRAFT-553)
Metadata
Current evaluation
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.
Resolution: closed resolved
Reason: The PR itself was merged into snapcraft master as merge commit 5c2a9d2f8 ("Merge pull request #3518 from snapcore/duplicate-warnings"), adding commits 9b60bb1ef (detect/log duplicate keys) and 2f80e5313 (always enable the warning). cmatsuoka rebased it onto master in Sept 2021 and expanded warnings to all duplicated keys before merge.
Evaluated by: mr-cal-bot
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | 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. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3518 (5c2a9d2f8), adding duplicate-key detection and warnings for snapcraft.yaml; review expanded warnings to cover all duplicate keys. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged into master after rebasing and approval. Adds a warning check for duplicate keys in snapcraft.yaml, logging all occurrences. Multiple warnings may trigger due to repeated file loads, to be optimized later. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into master. Adds duplicate key detection in snapcraft.yaml, logging warnings for all occurrences. Updated to report every duplicate instead of just the first, rebased, and approved. |
Update history
No update history recorded yet.
Related work
-
Related To:
snapcore/snapcraft#3517
(confidence 92%)
Original PR with the same duplicate-key warning change; #3518 was re-opened from it (2021-05-04) to be on origin for edge publishing.
-
Related To:
snapcore/snapcraft#3669
(confidence 85%)
Follow-up PR merged as a40a34314, escalating duplicate-key warnings to hard errors when loading parts.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3517 yaml: detect and log warning on duplicate keys in snapcraft.yaml | snapcraft | closed | Superseded by PR #3518, merged as 5c2a9d2f8, adding warnings for duplicate keys in snapcraft.yaml. | |
| #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). |