-
Notifications
You must be signed in to change notification settings - Fork 21
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
[Scala 2.12] Compilation error: Position.point on NoPosition
#10448
Comments
It looks like this comment and implementation:
|
In fact, there's already a fix floating around olafurpg/scala@d214b55 I'll PR it in a bit. IIRC, the position test was to ensure suppressing setter warning only for |
I've been meaning to send that PR but didn't manage to find a minimal reproduction test the fix. Would love to see this fixed since I've hit on it a few times in my projects. I've worked around the issue so far by removing unused local terms. |
@olafurpg Sorry I didn't get to it; I did look at an unused imports ticket that also had a sense of something else going on. The best solution is to register usages while typing, instead of examining trees later. Alternatively, use attachments to recover original trees, as is proposed. I'll make another attempt to diagnose and minimize this one. |
For some reason, I don't get the lagom error. I tried my local lagom, and also the branch from the PR. I zapped my I noticed lagom build warned on some unused implicit params, and it took me a while to understand that I learned a bit about So I don't know where the unpositioned trees are coming from. I won't attempt the sbt repro, which has more intermediate steps. I'll try a test with a macro that emits unfriendly trees instead. |
I get this compilation error often with implicits and refactoring. I am using My exact instance was I had a sealed trait. All the defined implementations of this trait had an implicit formatter for spray json. Later, I deleted some of the implementations, but did not remove the implicit vals. Using my IDE, latest IntelliJ and Scala plugin, to compile I see the After deleting the invalid implicits and a compile, I get a few other errors
|
I'm getting the same error (unfortunately I can't share the source), however removing |
I opened scala/scala#6232 to change the implementation in TypeDiagnostics to not rely on |
Might also be useful to reproduce scala/bug#10448 :)
Hi @olafurpg, I don't know if it can help but I reproduced the bug during my work on one of my open source project. I saved the code that reproduces the bug here: Colisweb/scala-distances#15 It's some very bad code because it's work in progress. In order to make the compiler succeed, you just have to comment the code of the function Hope it will help. I didn't succeed to reproduce the bug in a smaller project unfortunately. |
@guizmaii Thanks, I'm pushing a new PR, a test case is great! I'll take a look. |
Some more information: I can use these compiler flags:
But as soon as I add any of
I get the compiler error, ie even that will fail:
I can use these compiler flag in my maven build without getting any error. I tested on both eclipse IDE and Inteliij IDEA. |
I checked the fix against scala-distances. I added it to the existing PR of related improvements. Warning about PatVarDefs like |
Not sure if related, but now I'm getting an other error. Perhaps look more like #10604 though:
|
I could have used this fix today. I hadn't seen the behavior before, but adding |
Fixed in scala/scala#6190 |
I'm still getting this error with |
Sorry, I think it was a mistake on my part. It seems it was a false alarm. |
Hi everyone,
A bug in the compilation of Scala projects with Scala 2.12 has been reported here: sbt/sbt#3314 and here: lagom/lagom#887 (comment)
It could be reproduced thanks to the Lagom PR (lagom/lagom#887) where I try to update the version of Scala used in Lagom.
Do you need more informations ?
The text was updated successfully, but these errors were encountered: