gpt4 book ai didi

scala - 使用 sbt 类型的 ensime 依赖

转载 作者:行者123 更新时间:2023-12-04 21:49:42 24 4
gpt4 key购买 nike

在我的 build.sbt 中得到以下内容:

name := "Ledger Accounting"

libraryDependencies += "junit" % "junit" % "4.8" % "test"

libraryDependencies += "org.scalatest" % "scalatest" % "1.3" % "test"

这在我的 .ensime 相同目录中:
:use-sbt t
:project-package "uk.co.mydomain.ledger"

使用 sbt 我可以编译上面的内容并测试一个导入 scalatest 类的类,但是在 emacs ensime 中看不到 libraryDependencies 中的任何内容。

关于如何让 ensime 获取我的 build.sbt 并将 scalatest 添加到我的类路径的任何想法?理想情况下,不需要我管理两个相同依赖项的列表!

最佳答案

它正在处理中。见 comments on issue 157在 Github 项目中。两个相关引用:

I'm currently working on what I hope will be a comprehensive solution for sbt - using expectj to talk to the running sbt process. Should support 0.7 and 0.9 - 0.10 -- feel free to check out the branch (only supports 0.7) right now. - aemoncannon (the branch is sbt-revamp)



和,

I have implemented a simple version of idea 3 of mathiask as a stopgap measure to get something sort of working with the current ensime, in case anyone needs something before the final solution is ready: https://github.com/fhars/sbt-ensime-plugin - fhars



我建议尝试 fhars 的插件来生成 .ensime文件。您也可以编写自己的 SBT 任务来输出类路径;我有一个 variation of this在我的 SBT 项目定义中。

关于scala - 使用 sbt 类型的 ensime 依赖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7141516/

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