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

Anchor/Alias crashs on accessing not overridden key/value #617

Closed
hofbi opened this issue Aug 30, 2018 · 3 comments
Closed

Anchor/Alias crashs on accessing not overridden key/value #617

hofbi opened this issue Aug 30, 2018 · 3 comments

Comments

@hofbi
Copy link

hofbi commented Aug 30, 2018

My yaml file has the following structure

a_root: &root_anchor
  key1: value1
  key2: value2
b_child:
  <<: *root_anchor
  key2: value2_override

If I evaluate this file with yamllint.com or pyyaml this results into

a_root: 
  key1: value1
  key2: value2
b_child: 
  key1: value1
  key2: value2_override

But If I try to access the value of [b_child][key1] this result in a crash as key1 does not exit for b_child

This issue could be related to #312 and #110

@jbeder
Copy link
Owner

jbeder commented Sep 3, 2018

What do you mean "results in a crash"? Is it a segfault or an exception?

(I suspect that what you're seeing is that yaml-cpp doesn't support merge keys. See #41 )

@hofbi
Copy link
Author

hofbi commented Sep 3, 2018

Yeah you are right. It's an exception

unknown file: Failure
FailureC++ exception with description "bad conversion" thrown in the test body.

And looks quite simmilar to #41. Within #41 PR #300 is linked which should fix it. But I am not sure if this will also fix this issue. I added a comment with a test suggestion to check if PR #300 will also fix this issue (see #300 (comment))

@jbeder
Copy link
Owner

jbeder commented Sep 3, 2018

Sounds good. I'm going to close this as a duplicate of #41.

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

2 participants