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 with anchors in a different file impossible #8

Closed
nowox opened this issue Nov 24, 2015 · 2 comments
Closed

Merge with anchors in a different file impossible #8

nowox opened this issue Nov 24, 2015 · 2 comments

Comments

@nowox
Copy link

nowox commented Nov 24, 2015

This example will not work:

import hiyapyco

a = '''

---
foo: &foo
    a: 1
    b: 2
'''

b = '''

---
bar: *foo
'''

hiyapyco.load(a,b, method=hiyapyco.METHOD_MERGE)
@ex-nerd
Copy link
Contributor

ex-nerd commented Feb 9, 2016

This is because of the order things are done. First, all of the yaml files are loaded individually, and then the merge is performed.

I've been digging around in the hiyapyco and pyyaml code and am not sure if it's possible to implement this without breaking the other merge functionality (declaring the same property twice in the same file just overrides the first).

@zerwes
Copy link
Owner

zerwes commented Aug 5, 2016

ex-nerd stated it! wont do.

@zerwes zerwes closed this as completed Aug 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants