加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

scala – 使用类型sbt的ensime的依赖项

发布时间:2020-12-16 18:29:29 所属栏目:安全 来源:网络整理
导读:在我的build.sbt中得到以下内容: name := "Ledger Accounting"libraryDependencies += "junit" % "junit" % "4.8" % "test"libraryDependencies += "org.scalatest" % "scalatest" % "1.3" % "test" 这在我的.ensime中,同一目录: :use-sbt t:project-packa
在我的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添加到我的类路径中?理想情况下,不需要我管理两个相同依赖项的列表!

解决方法

它正在进行中.请参阅Github项目中的 comments on issue 157.两个相关的引用:

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 07001)

和,

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:
07002
fhars

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读