pyhocon
pyhocon copied to clipboard
substitution in child configs is broken
Using pyhocon==0.3.59 including child configs breaks the substitution. See attached sample.zip.
You can verify this example using:
pyhocon -i sample/root.conf
The resulting output contains an empty:
{
"my_obj": {}
}
Although according to substitution rules my_obj should contain a key_a with value default.
This is because in https://github.com/chimpler/pyhocon/blob/master/pyhocon/config_parser.py#L395 substitutions are explicitly disabled. If I understand the specification correctly, this is correct, as substitutions should happen "globally" after the object has been parsed. However with this implementation, such behaviour proves to be difficult to implement. Any ideas?