Unsupported merges
Current version of otherwise great yaml-cpp does not seem to support merges
in a way described for example here:
http://en.wikipedia.org/wiki/YAML#Data_merge_and_references
I don't have a deep knowledge of yaml-cpp internals (I am just its user),
but maybe this is somehow linked with the cloning problem - not yet
sufficiently solved.
I have tested the simple form of a merge in yaml-cpp 0.2.0 on RedHat Linux
3.4.6-9 using gcc 3.4.6 (20060404) - it doesn't work, but at least it
doesn't hurt the parser. With that gcc I am unable to compile 0.2.1 because
of new conversion operators in nodeimpl.h (it reported an error on lines
with "node.Read<T>" and the thing that caused that error was very probably
the templated read).
Do you plan to support merges in some future version?
Original issue reported on code.google.com by [email protected] on 8 Sep 2009 at 10:38
looks like this is probably a duplicate of #300 now
There are many duplicates to this feature request: #353, #617, #638, #683.
@Ortham proposed an implementation in #300 back in 2015 (!) that was garnering a lot of support, then closed in 2021 because it's not officially in the spec: https://github.com/jbeder/yaml-cpp/pull/300#issuecomment-877660781
Now:
- this issue is still open, and mentioned by many projects
- almost every online documentation of YAML that discusses "anchors" will introduce the
<<merge key capability - @Ortham did address the concern regarding the lack of spec here: https://github.com/jbeder/yaml-cpp/pull/300#issuecomment-428086289
Based on this, can we re-open the discussion to consider merge keys as a feature (even if optionally built) of yaml-cpp? Or should this issue be closed for the same reason that #300 was closed?
This is a good point, and I'm not sure.
This is a pretty big feature, and would need thorough review. I'm the only maintainer, and I unfortunately don't have time for it. I also (as you can see by this history of this feature) never really thought much of this feature.
I've been unable to find someone to help maintain this project (any takers?). If I found someone who I trusted and is willing to support and review this feature, then I'd be open to accepting this feature.
Also, thanks for the links to the other feature requests, and they should at least be closed as dupes of this one.