config icon indicating copy to clipboard operation
config copied to clipboard

[failed test] adding a value after an include

Open dwickern opened this issue 7 years ago • 2 comments

Given a one-line HOCON config file with an include (and no newline):

include "application"

Adding a value with the ConfigDocument API will produce an invalid config file:

include "application" foo : bar

dwickern avatar Oct 30 '17 21:10 dwickern

I assume it does work after adding a trailing newline?

I think we should consider whether HOCON files without a trailing newline should be considered invalid - it seems somewhat common to 'cat' HOCON files together (IIRC that happens when combining reference.conf files, but I could be misremembering), and when files don't have newlines that can lead to problems as well.

raboof avatar Oct 31 '17 08:10 raboof

I don’t think we can require newline at this point, not backward compatible (and not JSON-superset).

This seems like it will be a fixable bug but I haven’t investigated.

havocp avatar Oct 31 '17 12:10 havocp

We do not intend to extend the functionality of "Typesafe Config" further. See https://github.com/lightbend/config#maintained-by

ennru avatar Jul 06 '23 08:07 ennru