我在Ubuntu12.04和Scala2.9.2和ensime_2.9.2-RC1-0.9.3.RC4上使用Emacs 24快照。
基本上,我做了与https://groups.google.com/forum/?hl=en&fromgroups#!topic/ensime/HvvvFr5gSwg中描述的相同的事情
ensime generate生成.ensime文件。M-x ensime启动Emacs上的ENSIME。但是,当我尝试使用C-c C-v s启动Emacs中的SBT控制台时,它将显示以下错误:
[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
显然,ENSIME看错了项目定义的目录。它不是查看我的项目目录,而是实际查看~/.sbt。有什么解决办法吗?
发布于 2012-11-15 21:32:06
我也有同样的问题。我刚开始很敏感,所以我也不知道为什么会这样。而且,我对scala & ensime的了解是非常有限的,所以这只是一个可能更明显的问题。
不管怎么说,这是一个有问题的敏感函数:
(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" ))))基本上,ensime将使用上面的函数来搜索缓冲区上方的文件夹,您可以在其中点击C来确定根项目文件夹。因此,轻松修复就是简单地将a(空) .sbt文件夹添加到包含.ensime项目描述的文件夹中。
https://stackoverflow.com/questions/11547122
复制相似问题