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

Remove @implicitNotFound annotations #4060

Merged
merged 3 commits into from
Dec 1, 2021

Conversation

armanbilge
Copy link
Member

Find/replace fix for #4059.

@armanbilge armanbilge changed the title Remove implicitNotFound annotations Remove @implicitNotFound annotations Dec 1, 2021
@armanbilge armanbilge linked an issue Dec 1, 2021 that may be closed by this pull request
@satorg
Copy link
Contributor

satorg commented Dec 1, 2021

I am for it in general – such annotations should not be necessary. It is a compiler's job after all to provide us with meaningful error messages. I guess this annotation itself was invented in Scala long ago to alleviate some compiler weaknesses at that time.

But could we double check please what the error messages look like with this change in some relatively sophisticated cases for all Scala versions we support? Just to make sure we don't make things worse.

@armanbilge
Copy link
Member Author

I think this annotation is still useful, if you want to provide additional context (e.g., how to get that implicit). That seems to have been the original goal in #581, although it was never executed (?) and isn't relevant anymore anyway. But just saying what is missing is something the compiler does anyway, and I think (hope) has been doing for a while? :)

I tried some simple examples with a scastie in #4059 (comment) but not sure if that covers our concerns.

@djspiewak
Copy link
Member

Yeah I think this actually makes the error messages better because we get the fully-qualified names.

Copy link
Contributor

@satorg satorg left a comment

Choose a reason for hiding this comment

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

Makes sense to me. Thanks for looking into it.

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.

Missing @implicitNotFound for ApplicativeError and MonadError
3 participants