configuration fails when using fallback
andreaTP opened this issue · 3 comments
andreaTP commented
A couple of examples are here:
https://github.com/unicredit/shocon/tree/fallbackFail
one problem is probably in the parser that doesn't split keys on "." character.
the other is in the resolution of fallback ...probably...
evacchi commented
will look into it.
EDIT: alright, test fails at querying for b
. Currently fallback is not implemented properly: just one fallback value is allowed at a time, so we need to look into this.
evacchi commented
I think this is now fixed in the branch. We need more test cases, though (e.g. Arrays) but tests now pass. I've split the test case you gave into two and added a few more.
Now:
- fallback uses a stack of
shocon.Config.Object
- when a
shocon.Config.Object
is parsed theshocon.Config.Object.fromPairs()
routine is used. This transforms flat keys of the formfoo.bar.baz
into nested trees of Objects and then merges the trees by key.
andreaTP commented
this should be closed