scala-clippy
scala-clippy copied to clipboard
Issues using Ensime and Clippy
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.
I'm having the same issue.
I've seen this problem too
I can confirm this but I wonder if this is more an issue on the Ensime side...
Clippy should play nice and extend GlobalPhase
, as everyone else ;-)
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.
@dragos do you have any specific way to fix this problem? Hints appreciated (not to mention PRs of course ;) )
Having this problem too.