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

Cannot resolve reference to nested variable #304

Open
INRIX-Mark-Gershaft opened this issue Feb 16, 2023 · 0 comments
Open

Cannot resolve reference to nested variable #304

INRIX-Mark-Gershaft opened this issue Feb 16, 2023 · 0 comments

Comments

@INRIX-Mark-Gershaft
Copy link

Found issue where Java implementation can resolve nested substitution, but this implementation gets confused because it doesn't expect reference to yet unresolved substitution.

Here is an example:

configuration.param1 = null

server = {
    serverName = "1234"
    user = "reader"
}

databaseRole = ${server}
databaseRole.databaseName = "XD_"${configuration.persistence.suffix}

configuration.persistence.suffix = "r1"
configuration.persistence.connection = ${databaseRole}

dataExport = {
    ssh = {
        host = ${configuration.persistence.connection.serverName} 
    }
}

What is very strange is that removal of declaration configuration.param1 results in successful resolution of all substitutions.
However, with this declaration resolution crashes on configuration.persistence.connection.serverName with

raise ConfigWrongTypeException(
pyhocon.exceptions.ConfigWrongTypeException: configuration.persistence.connection has type ConfigValues rather than dict
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