-
Notifications
You must be signed in to change notification settings - Fork 148
Support for "<<: reference" #68
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
Comments
FWIW I also needed this and came across https://gitlab.kitware.com/utils/rust-yaml-merge-keys, which adds support for << on top on this library. Would still love it if it could be supported by yaml-rust by default, though! |
Thanks for the pointer. I've tried to make it work (I'm using serde-yaml) but it seems I'm not able to. |
|
@mathstuf I don't think it was questioned whether it works. The relevant function merge_keys_serde simply does not show up in the documentation on docs.rs (feature not enabled), so one has to find it in the source code of your library. Since this issue comes up in a google search, here's a minimal example:
|
I looked into it and it now seems possible to specify features for documentation builds. I'll do that for the crate. |
Ah, I had done so, but hadn't made a release since then. |
I've just published 0.2.1. |
There is a spec for this, althouth it is not part of 1.2 itself: https://yaml.org/type/merge.html |
I've seen multiple parsers get very loose around the merge key spec. Apparently this is valid for the Ruby parser: foo:
<<: *bar
<<: *baz (given anchors named |
I'm surprised there is no reference to this in the documentation as in my experience is widely used.
This is a good example of the expected output given "<<":
https://gist.github.com/bowsersenior/979804
But I get:
https://gist.github.com/JordiPolo/ce19f90de8ffc8ac31721a5961d1cc77
The text was updated successfully, but these errors were encountered: