从ensime运行sbt时java.io.IOException?

Tg.*_*Tg. 4 scala sbt ensime

我在mac os上试过了ensime/sbt.首先,我打开项目文件夹中的.scala文件,在命令行中使用sbt创建,然后我运行了ensime,它仍然正常工作,但每当我运行ensime-sbt(cc cv s)时,我得到了

java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:883)
at xsbt.boot.Locks$.apply0(Locks.scala:34)
at xsbt.boot.Locks$.apply(Locks.scala:27)
at scala.collection.Iterable$class.$init$(Proxy.scala:32)
at xsbt.boot.Launch$ScalaProvider.<init>(Launch.scala:107)
at xsbt.boot.Launch$$anonfun$1.apply(Launch.scala:83)
at org.apache.ivy.plugins.namespace.NamespaceRule.newEntry(Cache.scala:17)
at org.apache.ivy.plugins.namespace.NamespaceRule.apply(Cache.scala:12)
at xsbt.boot.Launch.getScala(Launch.scala:85)
at xsbt.boot.Launch$.run(Launch.scala:49)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:43)
at xsbt.boot.Launch$.launch(Launch.scala:68)
at xsbt.boot.Launch$.apply(Launch.scala:14)
at xsbt.boot.Boot$.runImpl(Boot.scala:24)
at xsbt.boot.Boot$.main(Boot.scala:15)
at xsbt.boot.Boot.main(Boot.scala)
    Error during sbt execution: java.io.IOException: No such file or directory

    Process sbt exited abnormally with code 1
Run Code Online (Sandbox Code Playgroud)

我尝试从命令行使用sbt,一切都在那里工作(编译/运行/控制台).我在mac os上的emacs24(2011/07/24)上使用了sbt 0.10.1和最新的二进制文件.

知道我做错了吗?

Ben*_*ald 6

我有这个,在应用strace之后我发现了这个问题.ensime-sbt.el函数从cwd中搜索./project/build.properties.在找到这个目录/文件时,它假定这是根目录.

所以只需创建此文件,此问题就会消失.如果ensime默认创建此文件,那将是很好的,因为它是sbt函数工作所需的文件.


Kaz*_*era 5

我遇到了同样的错误。这种情况似乎是sbt尝试的,但未能在用户的主目录中创建“ .sbt”和“ .ivy”目录。可能的原因是OS用户没有权限在用户的主目录中写入。