Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

substitution in child configs is broken #289

Open
Fohlen opened this issue Aug 24, 2022 · 1 comment
Open

substitution in child configs is broken #289

Fohlen opened this issue Aug 24, 2022 · 1 comment

Comments

@Fohlen
Copy link

Fohlen commented Aug 24, 2022

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.

@Fohlen
Copy link
Author

Fohlen commented Aug 24, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant