This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Seeking some help with IDEA 11 + scalatest (and more generally, configuring IDEA to work with with Scala-related tools)

2 replies
Ken McDonald
Joined: 2011-02-13,
User offline. Last seen 42 years 45 weeks ago.
In IDEA 11, I can run my scalatest test directly from IDEA, rather than needing to do it through the sbt console plugin. This is nice because the output from the IDEA tests have hyperlinks to the line the error occurred, while the tests run from the plugin do not. The hyperlinks could be a big timesaver.
However, when IDEA runs the tests directly, I get a stack trace in the output window, which does not happen when I run the tests from the plugin. My best guess is that somehow, IDEA is running quite an old version of scalatest, when the stack trace was the default. I've looked through all of the Project Structure dialog windows, but haven't found anything that seems related to this problem. But then, I don't have much experience in configuring IDEA at that level, as previous versions of IDEA seemed problematic with Scala when doing builds, tests, etc--I always used sbt from the plugin instead.
So I have the specific question above, and in addition, would welcome comments on other aspects of configuring IDEA to work optimally with Scala, especially tricky or nonobvious aspects.


Thanks,Ken
H-star Development
Joined: 2010-04-14,
User offline. Last seen 2 years 26 weeks ago.
Re: Seeking some help with IDEA 11 + scalatest (and more genera

Am 29.12.2011 01:54, schrieb Ken McDonald:
> In IDEA 11, I can run my scalatest test directly from IDEA, rather
> than needing to do it through the sbt console plugin. This is nice
> because the output from the IDEA tests have hyperlinks to the line the
> error occurred, while the tests run from the plugin do not. The
> hyperlinks could be a big timesaver.
>
> However, when IDEA runs the tests directly, I get a stack trace in the
> output window, which does not happen when I run the tests from the
> plugin. My best guess is that somehow, IDEA is running quite an old
> version of scalatest, when the stack trace was the default. I've
> looked through all of the Project Structure dialog windows, but
> haven't found anything that seems related to this problem. But then, I
> don't have much experience in configuring IDEA at that level, as
> previous versions of IDEA seemed problematic with Scala when doing
> builds, tests, etc--I always used sbt from the plugin instead.
>
> So I have the specific question above, and in addition, would welcome
> comments on other aspects of configuring IDEA to work optimally with
> Scala, especially tricky or nonobvious aspects.
>
>
>
> Thanks,
> Ken
delete the old version from your hard drive :)
idea should no longer compile, and something in your settings should be
highlighted in red.
also, there should be a console where you can see the complete classpath

Jason Zaugg
Joined: 2009-05-18,
User offline. Last seen 38 weeks 5 days ago.
Re: Seeking some help with IDEA 11 + scalatest (and more genera
On Thu, Dec 29, 2011 at 10:54 AM, Ken McDonald <ykkenmcd [at] gmail [dot] com> wrote:
In IDEA 11, I can run my scalatest test directly from IDEA, rather than needing to do it through the sbt console plugin. This is nice because the output from the IDEA tests have hyperlinks to the line the error occurred, while the tests run from the plugin do not. The hyperlinks could be a big timesaver.
However, when IDEA runs the tests directly, I get a stack trace in the output window, which does not happen when I run the tests from the plugin. My best guess is that somehow, IDEA is running quite an old version of scalatest, when the stack trace was the default. I've looked through all of the Project Structure dialog windows, but haven't found anything that seems related to this problem. But then, I don't have much experience in configuring IDEA at that level, as previous versions of IDEA seemed problematic with Scala when doing builds, tests, etc--I always used sbt from the plugin instead.
So I have the specific question above, and in addition, would welcome comments on other aspects of configuring IDEA to work optimally with Scala, especially tricky or nonobvious aspects.

If you generate the IDEA project files with the sbt-idea [1], you're guaranteed to have the same versions of libraries on your classpath.
[1] https://github.com/mpeltonen/sbt-idea

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland