Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge maps and lists in YAML blocks instead of left-biased union #4057

Open
na-sa-do opened this issue Nov 9, 2017 · 1 comment
Open

Merge maps and lists in YAML blocks instead of left-biased union #4057

na-sa-do opened this issue Nov 9, 2017 · 1 comment

Comments

@na-sa-do
Copy link

na-sa-do commented Nov 9, 2017

Always ignoring extant keys (pure left-biased union) can be a bit counterintuitive. It may be better to merge the contents of mappings and lists, then use left-biased union for conflicting scalar values, so that

---
one:
    first: 1
---
---
one:
    first: 2
    second: 3
---

should simplify to

---
one:
    first: 1
    second: 3
---
@jgm
Copy link
Owner

jgm commented May 5, 2018

See #3115 which seems to be a related issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants