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 not working inside user doc. #1

Open
DALDEI opened this issue Oct 14, 2017 · 1 comment · May be fixed by #2
Open

substitution not working inside user doc. #1

DALDEI opened this issue Oct 14, 2017 · 1 comment · May be fixed by #2

Comments

@DALDEI
Copy link

DALDEI commented Oct 14, 2017

java -jar hoc2js*.jar


a=b
b=${a}

Exception in thread "main" com.typesafe.config.ConfigException$UnresolvedSubstitution: Reader: 2: Could not resolve substitution to a value: ${a}
        at com.typesafe.config.impl.ConfigReference.resolveSubstitutions(ConfigReference.java:87)
        at com.typesafe.config.impl.ResolveSource.resolveCheckingReplacement(ResolveSource.java:110)
        at com.typesafe.config.impl.ResolveContext.resolve(ResolveContext.java:114)
        at com.typesafe.config.impl.SimpleConfigObject$1.modifyChildMayThrow(SimpleConfigObject.java:340)
        at com.typesafe.config.impl.SimpleConfigObject.modifyMayThrow(SimpleConfigObject.java:279)
        at com.typesafe.config.impl.SimpleConfigObject.resolveSubstitutions(SimpleConfigObject.java:320)
        at com.typesafe.config.impl.SimpleConfigObject.resolveSubstitutions(SimpleConfigObject.java:24)
        at com.typesafe.config.impl.ResolveSource.resolveCheckingReplacement(ResolveSource.java:110)
        at com.typesafe.config.impl.ResolveContext.resolve(ResolveContext.java:114)
        at com.typesafe.config.impl.ResolveContext.resolve(ResolveContext.java:149)
        at com.typesafe.config.impl.SimpleConfig.resolveWith(SimpleConfig.java:70)
        at com.typesafe.config.impl.SimpleConfig.resolveWith(SimpleConfig.java:33)
        at com.github.okapies.hoc2js.Hoc2Js.main(Hoc2Js.java:33)

Works fine when referencing existing built in conf

java ...


a=${hoc2js.render}


{"a":{"comments":false,"formatted":false,"originComments":false,"json":true}}

@jcii
Copy link

jcii commented Jan 4, 2018

I'm seeing the same with this test.conf file:

project: CM
component: Other
item: ${project}

which throws this error:

Exception in thread "main" com.typesafe.config.ConfigException$UnresolvedSubstitution: test.conf: 3: Could not resolve substitution to a value: ${project}

@henrikno henrikno linked a pull request Mar 9, 2020 that will close this issue
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 a pull request may close this issue.

2 participants