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

Chained substitution problem #313

Open
Savlik opened this issue Jul 20, 2023 · 1 comment
Open

Chained substitution problem #313

Savlik opened this issue Jul 20, 2023 · 1 comment

Comments

@Savlik
Copy link

Savlik commented Jul 20, 2023

Hi, i have a problem with simple substitution:

foo: "foo"
bar: ${foo}bar
bar: ${?foo2}
foobar: ${bar}

result: pyhocon.exceptions.ConfigSubstitutionException: Cannot resolve ${bar}: (line: 4, col: 9). Check for cycles.
expected: foo: foo, bar: foobar, foobar: foobar

Every slight modification work correctly as expected:

foo: "foo"
bar: ${foo}bar
bar: ${?foo2}

result: foo: foo, bar: foobar

foo: "foo"
bar: ${foo}bar
foobar: ${bar}

result: foo: foo, bar: foobar, foobar: foobar

foo: "foo"
bar: bar
bar: ${?foo2}
foobar: ${bar}

result: foo: foo, bar: bar, foobar: bar

Any ideas what is wrong, or how to fix it?

@sholsapp
Copy link

sholsapp commented Oct 16, 2024

Also hitting this bug. Thanks @Savlik for getting a minimal example together, it helped me identify the trigger in my application's configuration. I'm using [email protected].

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

2 participants