my127 / workspace

Development environment tooling
MIT License
16 stars 13 forks source link

Can't merge attribute arrays, only override wholesale #64

Open kierenevans opened 3 years ago

kierenevans commented 3 years ago

This leads to a lot of duplication of a harness into a project.

For example if a harness defines:

example:
  foo:
    - one
    - two
    - three

but we want to insert "one point five" between "one" and "two", we have to clone the whole array to the project:

example:
  foo:
    - one
    - one point five
    - two
    - three

This also affects removing something from the array. For example if we don't want two to happen:

example:
  foo:
    - one
    - ~

Ideally we'd be able to delete/insert as needed without replication, though this may become brittle for harness version upgrades if the array entry values were to change.

andytson commented 3 years ago

I think the main problem is we can't override arrays with a subset of array items rather than overriding every entry, but an explicit way to reference the original also would be good. My problem with it is I want the implicit override to wipe the array completely.

There's similar issue for maps, we can't wipe a whole map, but doing that on maps should be explicit instead of implicit for arrays