Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't Render Fully Qualified Name in Default Debug Renderer #72

Closed
adamgfraser opened this issue Apr 9, 2020 · 2 comments
Closed

Don't Render Fully Qualified Name in Default Debug Renderer #72

adamgfraser opened this issue Apr 9, 2020 · 2 comments

Comments

@adamgfraser
Copy link
Contributor

Currently the default renderer for Debug renders the fully qualified name of each constructor. So for example a Validation instance would be rendered as zio.prelude.Validation.Failure(zio.Chunk("some string")) whereas the rendering given by toString would be Failure(Chunk("some string")). While valid and perhaps optimal for compiling the rendering back to Scala, this is not the best default as it can lead to cluttered output when the constructor is deeply nested and inconsistent behavior depending on whether the user calls debug.render and toString even for user created types.

We should change the default renderer to render to unqualified name and add an additional renderer to render the fully qualified name. We can then test that the default rendering is equivalent to toString for all standard types.

@ghost
Copy link

ghost commented Apr 12, 2020

ill do it

@ghost ghost self-assigned this Apr 12, 2020
@adamgfraser
Copy link
Contributor Author

Awesome!

@ghost ghost mentioned this issue Apr 15, 2020
@ghost ghost closed this as completed Apr 21, 2020
This issue was closed.
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

No branches or pull requests

1 participant