akka-js / shocon

Simple pure-scala Typesafe HOCON implementation using FastParse
Apache License 2.0
74 stars 21 forks source link

Bug: missing `${variable}` support #36

Open Andrei-Pozolotin opened 6 years ago

Andrei-Pozolotin commented 6 years ago

Bug: missing ${variable} support

andreaTP commented 6 years ago

where the variable could come from in your opinion?

2m commented 6 years ago

I have also encountered this limitation. A couple of examples in Akka

 library-extensions = ${?akka.library-extensions} ["akka.serialization.SerializationExtension"]

https://github.com/akka/akka/blob/945440a38d437fa252e67089da020f695cd5c0b4/akka-actor/src/main/resources/reference.conf#L70

and

server-header = akka-http/${akka.http.version}

https://github.com/akka/akka-http/blob/59bd7157621afebce265d1a26c09f3e9ac22ffc8/akka-http-core/src/main/resources/reference.conf#L19

In theory these could be resolved during compilation time.

andreaTP commented 6 years ago

sounds like it will be totally possible to do it both at run and at compile time, I should find the time to look into.

andreaTP commented 6 years ago

I was looking into this, and it looks like it will require an effort: https://github.com/lightbend/config#concatenation

supporting all these use cases is a lot actually ...

I do not have time in the near future to target this issue but PR are welcome.