Closed milesj closed 2 years ago
I can't seem to get these to work, although yaml-rust looks to support them upstream. Given the following code:
yaml-rust
tasks: build: &webpack_shared command: webpack args: build inputs: - 'src/**/*' start: <<: *webpack_shared args: start
I'd expect tasks.start to inherit command and inputs, with args being overridden. However, both command and inputs are None once deserialized.
tasks.start
command
inputs
args
None
It also seems like anchors assigned at the top-level to fake fields are also not supported.
_webpack_shared: &webpack_shared command: webpack inputs: - 'src/**/*' tasks: build: <<: *webpack_shared args: build start: <<: *webpack_shared args: start
Has anyone actually gotten these to work?
This is implemented in 0.9. https://docs.rs/serde_yaml/0.9/serde_yaml/enum.Value.html#method.apply_merge
I can't seem to get these to work, although
yaml-rust
looks to support them upstream. Given the following code:I'd expect
tasks.start
to inheritcommand
andinputs
, withargs
being overridden. However, bothcommand
andinputs
areNone
once deserialized.It also seems like anchors assigned at the top-level to fake fields are also not supported.
Has anyone actually gotten these to work?