I'm using an Emacs 24 snapshot on Ubuntu 12.04 with Scala 2.9.2 and ensime_2.9.2-RC1-0.9.3.RC4.
Basically I did the same thing as described in https://groups.google.com/forum/?hl=en&fromgroups#!topic/ensime/HvvvFr5gSwg
ensime generate.M-x ensime.However when I try to start the SBT console within Emacs using C-c C-v s, it displays the following error:
[info] Loading project definition from /home/ximyu/.sbt/plugins
[info] Updating {file:/home/ximyu/.sbt/plugins/}default-86f483...
[error] a module is not authorized to depend on itself: default#default-86f483;0.0
[error] {file:/home/ximyu/.sbt/plugins/}default-86f483/*:update:
java.lang.IllegalArgumentException: a module is not authorized to depend on itself: default#default-86f483;0.0
Obviously ENSIME is looking at the wrong directory for project definition. Instead of looking at my project directory it is actually looking at ~/.sbt. Any solution to this?
I have the same issue. I just started with ensime, so I don't really know why this is the case either. Also, my knowlegde on scala & ensime is very limited, so this is only a work-around to something that might be more obvious.
Anyway, this is the problematic ensime function:
(defun ensime-sbt-project-dir-p (path)
"Is path an sbt project?"
(or (not (null (directory-files path nil "\\.sbt$")))
(file-exists-p (concat path "/project/Build.scala" ))
(file-exists-p (concat path "/project/boot" ))
(file-exists-p (concat path "/project/build.properties" ))))
Basically ensime will use above function to search for a folder above the buffer where you hit C-c C-v s to determine the root project folder. As such, an easy fix is to simply add a (empty) .sbt folder into the folder that contains your .ensime project description.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With