ensime on mac almost working, syntax checking after save stop working

559 Views Asked by At

Just getting started in Scala programming. I got an environment set up using emacs, sbt, ensime according to the instructions here. (http://jawher.net/2011/01/17/scala-development-environment-emacs-sbt-ensime/)

It worked great for a couple of days, but then when I exited emacs and restarted I couldn't get the syntax check working (the check that happens after saving a buffer).

I start ensime after openning the file, and I see on the mode line that it says that ENSIME: Connected. But for some reason, I stopped getting the highlights for errors in the file.

Any help? It's driving me nuts.

Note: I can do other things with ensime, like starting a sbt subprocess.

thanks wing

Got some more info... I noticed that when it doesn't work, the *inferior-ensime-server* hangs on the scala> REPL

Welcome to Scala version 2.7.7.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_26).
Type in expressions to have them evaluated.
Type :help for more information.

scala>

When it does work, it goes past the scala> prompt and enters swank (this works on my linux machine)

Handling RPC: (swank:symbol-designations /home/wing/work/scala-test1/src/main/scala/Main.scala 0 96 nil)
Writing: 000051(:return (:ok (:file "/home/wing/work/scala-test1/src/main/scala/Main.scala")) 3)
Indexing completed in 13.394 seconds.
Indexed 13564 classes with 117390 methods.
Writing: 000012(:indexer-ready t)

It almost seems like the ensime emacs scripts are failing to find something in the scala stream.

--- Buffers from emacs ---
*Message*

("emacs")
Loading encoded-kb...done
Loading cl-macs...done
Loading derived...done
Loading edmacro...done
Loading easy-mmode...done
For information about the GNU Project and its goals, type C-h C-p.
Main.scala has auto save data; consider M-x recover-this-file
Loading image...done
Loading advice...done
Loading cl-seq...done
Polling "/var/folders/0j/0jDMoITREkmpZqCgO11BCk+++TM/-Tmp-/ensime_port.2349".. (Abort with `M-x ensime-abort-connection'.) [4 times]
Read port 51568 from "/var/folders/0j/0jDMoITREkmpZqCgO11BCk+++TM/-Tmp-/ensime_port.2349".
Connecting to Swank on port 51568.. [2 times]
Loading cl-extra...done
Connected.
Wrote /Users/wing/work/scala/ensime-p1/src/main/scala/Main.scala [2 times]

-----
*ensime-events*

(:swank-rpc
 (swank:connection-info)
 1)
(:return
 (:ok
  (:pid nil :server-implementation
        (:name "ENSIMEserver")
        :machine nil :features nil :version "0.0.1"))
 1)
(:swank-rpc
 (swank:init-project
  (:project-package "com.myproject" :use-sbt t :root-dir "/Users/wing/work/scala/ensime-p1/"))
 2)  
1

There are 1 best solutions below

3
On

You can check ensime's emacs buffer for errors and publish them here.