Remix.run Logo
beder 8 hours ago

A very pedantic point, but merge keys are not part of the YAML spec [1]! Merge keys are a custom type [2], which may optionally be applied during the construction phase of loading. I definitely wouldn't say that merge keys are integral to anchors.

(Also, as a personal bias, merge keys are really bad because they are ambiguous, and I haven't implemented them in my C++ yaml library (yaml-cpp) because of that.)

[1]: https://yaml.org/spec/1.2.2/

[2]: https://yaml.org/type/merge.html

woodruffw 8 hours ago | parent [-]

Yeah, I find the situation here very confusing: I agree that merge keys are not part of YAML 1.2, but they are part of YAML 1.1. The reason they don't appear to be in the "main" 1.1 spec itself is because they were added to 1.1 after 1.1 was already deprecated[1].

[1]: https://ktomk.github.io/writing/yaml-anchor-alias-and-merge-...