buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Boisvert (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BUILDR-693) Selection of Scalatest jar is inadequate and doesn't work with Scala 2.10
Date Fri, 06 Dec 2013 16:30:35 GMT

    [ https://issues.apache.org/jira/browse/BUILDR-693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13841395#comment-13841395
] 

Alex Boisvert commented on BUILDR-693:
--------------------------------------

Hi Rick,

Please note that this selection is only used as default when no version of ScalaTest has been
specified.

You can specify any version of ScalaTest through properties, either in your buildfile or in
build.yaml.

Here's a sample build.yaml,

$ cat build.yaml 
scala.version: 2.10.2
scala.test: org.scalatest:scalatest_2.10:jar:2.0.M6-SNAP9
scala.check: org.scalacheck:scalacheck_2.10:jar:1.10.0

Alternatively, in your buildfile:

Buildr.settings.build['scala.test'] = "org.scalatest:scalatest_#{Buildr::Scala.version_without_build}:jar:2.0.M5"

We try to use the latest versions available at Buildr-release time but you're right that these
versions get stale pretty quickly.   For this reason, I like your suggestion of inspecting
the classpath and using scalatest.jar if it's already available -- seems more intuitive than
setting a different property.   I'll take this as a task to enhance ScalaTest (and other Buildr
tasks) to do this.

> Selection of Scalatest jar is inadequate and doesn't work with Scala 2.10
> -------------------------------------------------------------------------
>
>                 Key: BUILDR-693
>                 URL: https://issues.apache.org/jira/browse/BUILDR-693
>             Project: Buildr
>          Issue Type: Bug
>          Components: Test frameworks
>    Affects Versions: 1.4.14
>            Reporter: Rick Beton
>
> tests.rb includes code that determines its behaviour according to the Scala version in
use. The Scalatest jar dependency is hard-wired to an old version.
> So suppose I want to use scalatest_2.10-1.9.2.jar, I can't.
> A simple work-around in tests.rb around line 92 would be to expand it to
>     VERSION = case
>       when Buildr::Scala.version?(2.7)
>         '1.3'
>       when Buildr::Scala.version?(2.9)
>         '1.8'
>       else
>         '1.9.2'
>     end
> This would help me right now, but simply postpones the problem.
> A better solution might be to detect scalatest.jar on the dependencies for test and not
use a default unless scalatest was missing. 



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message