Problem with red squiggly lines and broken completion / types
As documented in more detail in our Contributing Guide, ENSIME relies on type information provided by Scala’s Presentation Compiler and it is known to issue false positives. To help you diagnose problems, we wrote PC Plod. You can write a PC Plod unit test for the library that you are using to raise awareness with the author of that library that they not compatible with the presentation compiler (and error reporter).
We are also experimenting with workarounds to the specific problem of complex implicit resolutions. These will require you to get involved as a contributor:
- prefer semi-auto derivation to full generic derivation
- SCP-010 Compiler Profiling
- inductive implicits
The presentation compiler supports regular blackbox macros but does not support advanced whitebox macros (e.g. shapeless
Generic fundef materialisers) or annotation macros (like simulacrum’s
@typeclass). If you are a library author, consider using a compiler plugin based on AnnotationPlugin.scala instead of macro-paradise.
- Check if you’re running out of RAM, if so try the workarounds documented in #1756.
- If you enabled reverse lookups, this could be the cause. Note that earlier versions of ensime-sbt would generate project configurations with this enabled, by default.
- See “Problem with red squiggly lines” above, as it has the same root cause.
- Ensure that your build tool and editor plugins are up to date.
- Fully compile your project, ENSIME uses your binaries for indexing.
- Check all ENSIME FAQ issues and do a quick search.
If that solved your problem, great! If not, try asking in the chat room for your text editor’s plugin.
Remember, everybody is here to help, but nobody is paid to maintain ENSIME (not even the sponsored developers). For ENSIME to be sustainable, we need you to engage in the bug fixing process rather heavily and (ideally) submit a pull request with a fix.