如何让 sbt 使用 $SCALA_HOME 目录中的 scala 二进制文件?
sbt 在此位置为每个 sbt 项目下载新版本的 scala 编译器和 scala 库: ./project/boot/scala-2.8.1/lib/scala-library.jar
./project/boot/scala-2.8.1/lib/scala-compiler.jar
如何让它从 $SCALA_HOME 指向的位置获取编译器和库?
另外,令我惊讶的是,这不是一个常见的要求。 Scala 开发人员是否更喜欢为每个项目使用单独的编译器和库副本?
我发现同样的请求没有得到答复: http://groups.google.com/group /simple-build-tool/browse_thread/thread/9e2c7bc34253ad0f?pli=1
预先感谢您的帮助。
sbt downloads new version of scala compiler and the scala library for every sbt project at this location:
./project/boot/scala-2.8.1/lib/scala-library.jar
./project/boot/scala-2.8.1/lib/scala-compiler.jar
How do I make it pick up the compiler and the library from the location pointed by $SCALA_HOME?
Also, I am surprised that it's not a common requirement. Do Scala developers prefer to use a separate copies of compiler and library for every project?
I found the same request which was unanswered:
http://groups.google.com/group/simple-build-tool/browse_thread/thread/9e2c7bc34253ad0f?pli=1
Thanks in advance for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
免责声明,我自己不使用这个,但我很好奇这是否可能。
基于使用本地 scala 实例,我定义了以下项目:
然后在
project/build/build.properties
中:然后我可以看到 console 目标工作正常,这表明它也适用于编译和运行。
Disclaimer, I don't use this myself but I was curious about whether this is possible.
Based on using a local scala instance, I defined the following project:
Then in
project/build/build.properties
:Then I can see that the console target works fine, which would suggest that it would work for compilation and running as well.
虽然我理解这种担忧,但我认为使用单独的副本是一件好事,
不同的scala版本。这并不罕见(我目前有项目
其中使用 2.8.0,其他使用 2.8.1,其他使用 2.9.0.RC1...) - 因此:
每次切换到另一个项目时都会编辑 $SCALA_HOME 吗?不可行
如果你克隆其他人的项目,速度非常快
在那里,无论您是否已经拥有该特定版本,
仅在您的本地硬盘上更大。考虑到你身上的东西的数量
对于开发人员计算机,我会说每个库和编译器的额外大小
项目是微不足道的,标准硬盘有几百 GB
您是否尝试在 sbt googlegroup 上再次询问这个问题?
While I understand the concern, I would argue that using separate copies is a good thing
different scala versions. this is not uncommon (i currently have projects
which use 2.8.0, other that use 2.8.1, others that use 2.9.0.RC1...) -- thus:
would you edit $SCALA_HOME every time you switch to another project? not feasible
very fast
there, whether you had that particular version already or not
is only bigger on your local harddisk. considering the amount of stuff you have on
a developer computer, i would say the extra sizes for the library and compiler per
project are peanuts with standard harddisks being several hundered GB
Did you try to ask the question again on the sbt googlegroup?