Skip to content

Conversation

@feitzi
Copy link
Contributor

@feitzi feitzi commented Aug 27, 2019

As described in #3886 the Config.ToString(true) doesn't include all fallback values.
The reason for the missing value is, that the toString() methods of the underlying hocon classes do skip all fallback values.

if (kvp.Value.AdoptedFromFallback) continue;

With this PR I adapted this behavior with an internal toString() that also expects an includeFallback boolean. The public toString() uses this internal overload with 'includeFallback = false`.

Furthermore, the toString() of config, changes the internal representation. That isn't expected (at least for me). Therefore I changed this to an immutable merge and execute the merging on this temporarily new object.

@Aaronontheweb
Copy link
Member

cc @Arkatufus - how should we handle this / backport it to HOCON stand-alone?

@Aaronontheweb
Copy link
Member

@IgorFedchenko did you already implement this in the stand-alone HOCON project?

@IgorFedchenko
Copy link
Contributor

@IgorFedchenko did you already implement this in the stand-alone HOCON project?

@Aaronontheweb Yup, this is already implemented there.

@Aaronontheweb
Copy link
Member

Implemented in akkadotnet/HOCON#181

@Aaronontheweb Aaronontheweb reopened this Jan 23, 2020
@Aaronontheweb
Copy link
Member

This would actually be really useful in debugging some of the issues I'm running into with #4128

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aaronontheweb Aaronontheweb merged commit 98aae17 into akkadotnet:dev Jan 23, 2020
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 this pull request may close these issues.

3 participants