Fixup substitutions in included files
According to the docs substitutions should be fixed up for included files:
Say for example that the root configuration is this:
{ a : { include "foo.conf" } }And "foo.conf" might look like this:
{ x : 10, y : ${x} }If you parsed "foo.conf" in isolation, then
${x}would evaluate to 10, the value at the pathx. If you include "foo.conf" in an object at keya, however, then it must be fixed up to be${a.x}rather than${x}.
And:
Say that the root configuration redefines
a.x, like this:{ a : { include "foo.conf" } a : { x : 42 } }Then the
${x}in "foo.conf", which has been fixed up to${a.x}, would evaluate to42rather than to10. Substitution happens after parsing the whole configuration.
Currently, this is not supported in pyhocon. I've turned the examples from the docs into tests: https://github.com/zapster/pyhocon/commit/466e298d8168b52515f0fcb7d6d034598cb881c4 (feel free to use them)
In pyhocon 0.3.35 this seems to be working. It is evaluated to 42.