app-config icon indicating copy to clipboard operation
app-config copied to clipboard

extendsSelf concatenate with some string

Open pats opened this issue 2 years ago • 1 comments

Hi,

I was wondering, is below action possible right now?

What I'd like to achive is to use already defined value with some other values, i.e. concatenate with some string

myHost: 'localhost',
check: {
 http: 'http://${myHost}/is-alive'
}

is it possible?

PS

pats avatar Nov 28 '22 11:11 pats

This would be a great feature. Unfortunately, it's somewhat of a circular problem, and hard to define the semantics correctly. You could see how a loop can be written easily:

foo: '${bar}'
bar: '${foo}'

it requires lazy initialization, which isn't currently done today (at least, today's parsing is materializing BFS). values would need representations as thunks, and perform cycle detection, most likely.

it would probably be better to find and support a YAML-like format that supports such a thing.

joelgallant avatar Nov 29 '22 03:11 joelgallant