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

Improve typer traces #14270

Merged
merged 1 commit into from Jan 21, 2022
Merged

Improve typer traces #14270

merged 1 commit into from Jan 21, 2022

Conversation

dwijnand
Copy link
Member

  1. Drop traceIndented from isSubType, which calls recur so it was just
    doubling the lines

  2. Replace newlines with spaces, in doTrace and traceIndented, as
    they're meant to be single lines. For example ErrorType and
    MatchType have toText that are multi-line and mess up the output.

  3. Change ExplainingTypeComparer#addConstraint to use show like the
    other methods.

1. Drop traceIndented from isSubType, which calls recur so it was just
   doubling the lines

2. Replace newlines with spaces, in doTrace and traceIndented, as
   they're meant to be single lines.  For example ErrorType and
   MatchType have toText that are multi-line and mess up the output.

3. Change ExplainingTypeComparer#addConstraint to use show like the
   other methods.
@dwijnand
Copy link
Member Author

Ah, wonderful, there's a test that demonstrates the needless repetition that I'm getting rid of.

@dwijnand dwijnand marked this pull request as ready for review January 15, 2022 16:32
@dwijnand dwijnand requested a review from odersky January 15, 2022 16:32
Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

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

That's a welcome cleanup.

@odersky odersky merged commit b0fa1fd into scala:master Jan 21, 2022
@dwijnand dwijnand deleted the improve-typer-trace branch January 21, 2022 14:02
@Kordyjan Kordyjan added this to the 3.1.2 milestone Aug 2, 2023
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.

None yet

3 participants