sudoblockio / tackle

Tackle is a programmable configuration language for building modular utilities, code generators, and CLIs with schema validation baked in.
Apache License 2.0
51 stars 2 forks source link

Overrides Improvements #247

Open robcxyz opened 8 months ago

robcxyz commented 8 months ago

Overrides Improvements

Improve how overrides are tracked and applied when parsing files / hooks

Overview

Overrides are needed for testing as input fields need values inserted for testing.

I think long story short, overrides should be assessed on each key. Right now overrides don't work when parsing the field context of dcl hooks. This is a pain as it makes us split up the logic

Examples

Override


foo:

  bar:

    baz: 1

Input


foo:

  bar: 1

Override


foo:

  bar:

    - null

    - 1

Input


foo:

  bar:

    - 1

    - 2

Command line

tackle --foo baz

tackle --override foo.yaml + tackle --override foo=baz


foo: bar

foo->: bar

foo_>: bar

f<-:

  foo: bar

  foo->: bar

f<-:

  exec:

    foo: bar

    foo->: bar

    foo_>: bar

TTD