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

Shorten traces for TypeMismatch errors under -explain #18742

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Oct 21, 2023

This is a partial fix for #18737. We still can't explain the differences concisely, but at least we shorten the comparison traces by showing only steps that contributed to the overall failure and by avoiding repetitions.

This is a partial fix of scala#18737. We still can't explain the differences concisely,
but at least we shorten the comparison traces by showing only steps that contributed
to the overall failure and by avoiding repetitions.
Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

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

LGTM. I wondered whether -Ydebug is the flag to use to unshorten and also whether we should be discarding the approx information. But I've come down with being happy with your choices there - and the rest is great to start with.

@odersky
Copy link
Contributor Author

odersky commented Oct 23, 2023

Also not sure about -debug. -verbose could be an alternate?

I don't think the (approx) info is useful without further explanation, that's why I dropped it.

@dwijnand
Copy link
Member

Also not sure about -debug. -verbose could be an alternate?

Not sure - I end up not liking the result of any of them and just modifying the compiler.

@odersky odersky merged commit 38559d7 into scala:main Oct 25, 2023
18 checks passed
@odersky odersky deleted the fix-18737 branch October 25, 2023 08:38
@Kordyjan Kordyjan added this to the 3.4.0 milestone Dec 20, 2023
WojciechMazur added a commit that referenced this pull request Jun 23, 2024
…TS (#20738)

Backports #18742 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
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