Skip to content

Add a debugDescription for TypeInfo for use when logging#12

Merged
djones6 merged 1 commit intomasterfrom
issue.debug
Sep 27, 2018
Merged

Add a debugDescription for TypeInfo for use when logging#12
djones6 merged 1 commit intomasterfrom
issue.debug

Conversation

@djones6
Copy link
Copy Markdown
Contributor

@djones6 djones6 commented Sep 25, 2018

The description property for TypeInfo produces a human-readable representation of the structured type information, which includes recursing into nested types.

When a TypeInfo enum is used in a log message, the output can be overly verbose. In my scenario, I want to be able to identify the case and associated top-level type for the purposes of debugging.

This PR defines a more compact representation in the debugDescription (via CustomDebugStringConvertible) which describes the case that a TypeInfo represents, and its immediate associated types (but no more). An exception is .dynamicKeyed, whose description is already suitably succinct.

Copy link
Copy Markdown
Contributor

@ianpartridge ianpartridge left a comment

Choose a reason for hiding this comment

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

Fine - I think new conformances are SemVer minor?

@djones6 djones6 merged commit c04a1a3 into master Sep 27, 2018
@djones6 djones6 deleted the issue.debug branch September 27, 2018 15:32
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.

2 participants