scala-clippy icon indicating copy to clipboard operation
scala-clippy copied to clipboard

Issues using Ensime and Clippy

Open jqno opened this issue 7 years ago • 7 comments

I'm trying to use both Ensime and Clippy on the same machine, but they don't seem to enjoy each other's company 😅. I'm not sure whether to raise the issue here or with Ensime, but since I'm seeing a stacktrace with Clippy-related things, I'm starting here. Please let me know if I should bring this to Ensime.

Anyway, Clippy is running quite well on my machine, but when I'm trying to open my project in Vim with Ensime, Ensime suddenly stops working. After some frustrations, I finally found this in the Ensime logs:

java.lang.ClassCastException: com.softwaremill.clippy.InjectReporter$$anon$1 cannot be cast to scala.tools.nsc.Global$GlobalPhase
	at scala.tools.nsc.Global$Run$$anonfun$compileLate$2$$anonfun$apply$1.apply(Global.scala:1607)
	at scala.tools.nsc.Global$Run$$anonfun$compileLate$2$$anonfun$apply$1.apply(Global.scala:1607)
	at scala.reflect.internal.SymbolTable.enteringPhase(SymbolTable.scala:235)
	at scala.tools.nsc.Global$Run$$anonfun$compileLate$2.apply(Global.scala:1607)
	at scala.tools.nsc.Global$Run$$anonfun$compileLate$2.apply(Global.scala:1606)
	at scala.collection.Iterator$class.foreach(Iterator.scala:750)
	at scala.collection.AbstractIterator.foreach(Iterator.scala:1202)
	at scala.tools.nsc.Global$Run.compileLate(Global.scala:1606)
	at scala.tools.nsc.interactive.Global.scala$tools$nsc$interactive$Global$$parseAndEnter(Global.scala:656)
	at scala.tools.nsc.interactive.Global.backgroundCompile(Global.scala:562)
at scala.tools.nsc.interactive.PresentationCompilerThread.run(PresentationCompilerThread.scala:25)

Here's the complete log, in case it's relevant.

When I remove Clippy from my global build settings, Ensime works fine again.

jqno avatar May 05 '17 12:05 jqno

I'm having the same issue.

gigiigig avatar May 08 '17 14:05 gigiigig

I've seen this problem too

smungee avatar Jul 24 '17 23:07 smungee

I can confirm this but I wonder if this is more an issue on the Ensime side...

jan0sch avatar Nov 23 '17 18:11 jan0sch

Clippy should play nice and extend GlobalPhase, as everyone else ;-)

dragos avatar May 09 '18 14:05 dragos

This happens on Eclipse Scala IDE too: if you add the clippy plugin to an sbt-eclipse controlled project, Scala IDE loses the worksheet functionality and in general starts to have (more than usual) problems with highlighting and compiling.

michelemauro avatar May 10 '18 06:05 michelemauro

@dragos do you have any specific way to fix this problem? Hints appreciated (not to mention PRs of course ;) )

adamw avatar May 11 '18 11:05 adamw

Having this problem too.

quasi-coherent avatar Sep 23 '18 17:09 quasi-coherent