Demo Implicit Search Analyzer for Melbourne Scala meetup tomorow, but can't get working :(

At ScalaDays Alexander showed me an impressive new feature of Intellij where the it is possible to visualize a recursive implicit search in Intellij. Critically, it shows not only successful, but also failed searches and a reason why.

In 24 hours Im presenting at Melbourne Scala meetup about ScalaDays [http://www.meetup.com/Melbourne-Scala-User-Group/events/222827214/] and I wanted to demo this feature. However, I have not been able to get it fully working, in my local environment, IDEA 14.1.3, Scala plugin 1.5.2.

I have checked out this code [https://github.com/benhutchison/prickle/tree/ambiguous_implicit_demo] and uncommented `fruitPickler2`. This creates an ambiguous implicits problem which I was hoping to show in the analyzer.

However, when I highlight `Unpickle[Seq[Fruit]]` on line 112, and then Cmd-Shift-P, Im only seeing the successful implicit search, not other candidates. The ambiguous problem is not mentioned, and my view looks nothing like the detail in eg [http://blog.jetbrains.com/scala/2015/03/05/scala-1-4-eap-brings-advanced-implicits-analyzer-and-faster-play-compiler/] - only success cases are being mentioned.

Any advice welcomed on how to enable this feature before my presentation...

Thank you
Ben Hutchison

5 comments
Comment actions Permalink

It's implicit parameters search bug I created a ticket for it: https://youtrack.jetbrains.com/issue/SCL-8860

Sorry for the long response as it's not actual for your event now. Did you find another example for your talk?

Best regards,
Alexander Podkhalyuzin.

0
Comment actions Permalink

No I didnt get it working so I just described the feature and showed the screenshot from your blog post.

0
Comment actions Permalink

Sorry for that, your case looks like real world application and this is much better.
I'm using this feature internally to debug cases when something is different from compiler (like your case). So it's much simpler to understand what's wrong -> faster fix.

Best regards,
Alexander Podkhalyuzin.

0
Comment actions Permalink

Happy my example helps improve the Analyzer feature.

While I love the power of implicits, its always been a bit scary how poor the tools were to diagnoses them when they did'nt work as expected, eg -XlogImplicits or declaring them by hand experimentally. It makes me reluctant to use eg Shapeless in team projects at work, since Im not sure if we can support it.

So IMO this analyzer addresses a major tooling need I have experienced.

0
Comment actions Permalink

As I know such imlicits analyzer will be unique in IntelliJ IDEA for some time as presentation compiler is not able to collect such information about implicits and it's hard to implement.

Only problem is that our analyzer is not Scala compiler, so it can have differences like you found, but we are close to be almost Scala compiler, so I hope in future it will be better.

Best regards,
Alexander Podkhalyuzin.

0

Please sign in to leave a comment.