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

Rendering a parsed config does not hold same results #805

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sunnymoon
Copy link

When rendering a parsed ConfigObject, in a scenario where there is a configuration like

@config-file1.conf
include file("values.conf")
outer {
include file("config-file2.conf")
}

@config-file2.conf
inner = ${value.url}

@values.conf
value {
url = "http://localhost"
}

the rendered ConfigObject after just Parseable.newFile("config-file2.conf").parse() has:

value {
url = "http://localhost"
}
outer {
inner = ${ outer.value.url }
}

instead of what was actually read :

value {
url = "http://localhost"
}
outer {
inner = ${ value.url }
}

This means that if parsed back again and then later resolved, it will break because there is no outer.value.url.
However, if resolved from the original file, it resolves correcly as inner=http://localhost (as expected).

…() ) ) != parse() which shouldn't be the case
@lightbend-cla-validator
Copy link
Collaborator

Hi @sunnymoon,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:

http://www.lightbend.com/contribute/cla

@sunnymoon
Copy link
Author

Hi @sunnymoon,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:

http://www.lightbend.com/contribute/cla

Already signed

@guerrillalg
Copy link

@lightbend-cla-validator
Any progress on this PR?

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

Successfully merging this pull request may close these issues.

3 participants