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

Make NoAutoTupling work with Function1 #147

Closed
gabro opened this issue May 6, 2017 · 7 comments · Fixed by #194
Closed

Make NoAutoTupling work with Function1 #147

gabro opened this issue May 6, 2017 · 7 comments · Fixed by #194

Comments

@gabro
Copy link
Collaborator

gabro commented May 6, 2017

See the discussion here and here.

The failing cases (rewrite not applied) are

def f: (((Int, String)) => ((String, List[Int])) => Int) = a => b => a._1
f(1, "")("a", Nil)

and

val f = (a: (Int, Boolean)) => a
f(2, true)

This is currently blocked by scalameta/scalameta#837

We can tackle this in two ways:

@olafurpg
Copy link
Contributor

olafurpg commented Jun 8, 2017

I just realized that this is still an issue when the Function1 is defined in a 3rd party library, a minimal repro is here 112a355

The problem happens when we don't have access to the denotation. We currently only store denotations for symbols compiled with the Scalahost compiler plugin enabled. I think we should keep this issue open. I believe a long-term solution to this issue would be to use reported compiler warnings, as proposed #194.

@olafurpg olafurpg reopened this Jun 8, 2017
@gabro
Copy link
Collaborator Author

gabro commented Jun 8, 2017

Right, I'll investigate further on the subject, but I think we'll need a scalameta "hack" to get the caret positions of those messages.

@olafurpg
Copy link
Contributor

olafurpg commented Jun 8, 2017

Yeah, we can accommodate on the Scalameta side to make the positions of the reported messages more accurate.

@olafurpg
Copy link
Contributor

olafurpg commented Jun 8, 2017

Seems scalameta/scalameta#930 is a go, which means we will store the denotations for all used symbols per .semanticdb file.

@gabro
Copy link
Collaborator Author

gabro commented Jun 9, 2017

Cool! I still think compiler messages would be much more accurate than any name/denotation based approach, but that feature is certainly going to help in the future.

@gabro gabro added the blocked label Jun 9, 2017
@olafurpg
Copy link
Contributor

Is this fixed now that we use messages?

@gabro
Copy link
Collaborator Author

gabro commented Jun 27, 2017

Yes!

@gabro gabro closed this as completed Jun 27, 2017
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 a pull request may close this issue.

2 participants