Skip to content

Two fixes in trace showing #16200

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

Merged
merged 1 commit into from
Nov 23, 2022
Merged

Two fixes in trace showing #16200

merged 1 commit into from
Nov 23, 2022

Conversation

dwijnand
Copy link
Member

@dwijnand dwijnand commented Oct 17, 2022

First, summon Show[T] instances, when show = true, and fail inlining (i.e. compilation) if it doesn't exist.

Secondly, even when show = false (i.e. the default), use the Show instance if one exists.

The motivation here was I had some non-Showable value, for which there is a Show instance, that wasn't showing properly under show=true.

First, summon Show[T] instances, when show = true, and fail inlining
(i.e. compilation) if it doesn't exist.

Secondly, even when show = false (i.e. the default), use the Show
instance if one exists.

The motivation here was I had some non-Showable value, for which there
is a Show instance, that wasn't showing properly under show=true.
@dwijnand dwijnand marked this pull request as ready for review October 18, 2022 07:37
@dwijnand dwijnand requested a review from smarter October 18, 2022 07:37
@dwijnand dwijnand requested review from SethTisue and removed request for smarter November 7, 2022 20:39
@SethTisue
Copy link
Member

I'd be most comfortable approving this if you walked me through the changes at one of our sessions next week — probably it won't take long.

@dwijnand
Copy link
Member Author

If show = true then instead of just supporting Showable, I actually summon the appropriate show instance and use it with the i interpolator. When show = false, I reach for a Show instance if one's available, before falling back to alwaysToString, as it used to do.

So now if the trace result is an (Type, Type) it will actually pretty print the types.

@SethTisue SethTisue removed their assignment Nov 23, 2022
@dwijnand dwijnand merged commit bfa800e into scala:main Nov 23, 2022
@dwijnand dwijnand deleted the trace/show branch November 23, 2022 08:52
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