miker2 / flexi_config_reader

A flexible configuration format that supports templated tables and referencing of existing keys.
MIT License
3 stars 1 forks source link

Merging of `kStructInProto` and `kStruct` is not allowed (can't easily `[override]` keys in a `kStructInProto` either) #142

Open michael-projectx opened 2 months ago

michael-projectx commented 2 months ago

Reproducible example:

In foo.cfg:

struct protos
  proto foo {
    struct bar {
      a = 0
    }
    struct baz {
      b = 1
    }
  }
}

struct fizz {
  reference protos.foo as a {}
  reference protos.foo as b {}
}

Then in foo_override.cfg

include foo.cfg

struct fizz {
  struct a {
    struct baz {
      b [override] = -1
    }
  }
}

This fails with a MismatchTypeException (config_helpers.cpp:55). Need to investigate what causes this.

jayv commented 18 hours ago

Similarly trying to combine both in a list also fails