gpt4 book ai didi

scala - 从 ensime 运行 sbt 时出现 java.io.IOException?

转载 作者:行者123 更新时间:2023-12-02 05:18:44 24 4
gpt4 key购买 nike

我在 mac os 上尝试过 ensime/sbt。首先,我打开在命令行中使用 sbt 创建的项目文件夹中的 .scala 文件,然后运行 ​​ensime,它仍然工作正常,但每当我运行 ensime-sbt (c-c c-v 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

我尝试从命令行使用 sbt,一切正常(编译/运行/控制台)。我在 mac os 上的 emacs24 (2011/07/24) 上使用 sbt 0.10.1 和最新的二进制 ensime。

知道我做错了吗?

最佳答案

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

所以只要创建这个文件,这个问题就会消失。如果 ensime 默认创建这个文件就好了,因为它是 sbt 函数工作所需的文件。

关于scala - 从 ensime 运行 sbt 时出现 java.io.IOException?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7005221/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com