got the following in my build.sbt:
name := "Ledger Accounting"
libraryDependencies += "junit" % "junit" % "4.8" % "test"
libraryDependencies += "org.scalatest" % "scalatest" % "1.3" % "test"
This in my .ensime, same directory:
:use-sbt t
:project-package "uk.co.mydomain.ledger"
Using sbt I can compile the above and test a class which imports scalatest classes, however in emacs ensime cannot see anything in libraryDependencies.
Any ideas on how to make ensime pick up my build.sbt and add scalatest to my classpath? Ideally something that doesn't require me managing two lists of the same dependencies!
It's being worked on. See the comments on issue 157 in the Github project. Two relevant quotes:
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)
and,
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
I suggest trying fhars' plugin to generate the .ensime
file. You could also write your own SBT task to output the classpath; I have a variation of this in my SBT project definition.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With