pyhocon icon indicating copy to clipboard operation
pyhocon copied to clipboard

+= inside an object creates an invalid ConfigSubstitution

Open Mirosta opened this issue 7 years ago • 0 comments

Example:

base = {
  numbers = [1,2,3]
  other = test
}
extends = ${base} {
  numbers += [4,5]
}

Expected: extends.numbers = [1,2,3,4,5] Actual: extends.numbers = [4,5]

I believe this is due to the fact that when the config_parser creates the ConfigSubstitution in ConfigTreeParser.postParse it uses a relative path and not an absolute path as the variable name

For example:

numbers = [10,11]
base = {
  numbers = [1,2,3]
  other = test
}
extends = ${base} {
  numbers += [4,5]
}

Expected: extends.numbers = [1,2,3,4,5] Actual: extends.numbers = [10,11,4,5]

Mirosta avatar Nov 29 '18 08:11 Mirosta