You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Jesse Eichar <je...@camptocamp.com> on 2010/03/03 16:47:07 UTC
Scala Specs on Scala2.8
Hi,
I am trying out Buildr with a Scala 2.8 project. Making the project compile is simple (well done!).
However I am trying to executes my Scala Specs. To do this I must use the correct Specs version and build. The maven dependency is:
org.scala-tools.testing:specs_2.8.0.Beta1:jar:1.6.3
I tried with this test dependency and without but it fails to compile for some reason. I have also tried to test with junit:
The scala code in src/main/scala compiles without a glitch so that is not the problem. Here is the test configuration a few configurations I have tried:
> test.using(:junit).with("org.scala-tools.testing:specs_2.8.0.Beta1:jar:1.6.3")
> test.using(:specs)
> test.using(:specs).with('org.scala-tools.testing:specs_2.8.0.Beta1:jar:1.6.3')
The two attempts using :specs I did not expect to succeed.
But the junit configuration I did expect to pass. When I manually execute the scalac command it compiles but buildr fails with:
> /Users/jeichar/Local_Projects/maven-project-creator/src/test/scala/XmlStrategySpec.scala:2: error: value specs is not a member of package org
> import org.specs._
> ^
> /Users/jeichar/Local_Projects/maven-project-creator/src/test/scala/XmlStrategySpec.scala:7: error: value should is not a member of java.lang.String
> "XmlStrategy" should {
> ^
> [typer in 51ms]
> [total in 64ms]
> two errors found
Is there any funny stuff going on that I am missing?
Is there anyway that I can override the version of Specs and ScalaCheck that are added to the classpath?
Jesse
Re: Scala Specs on Scala2.8
Posted by Jesse Eichar <je...@camptocamp.com>.
I think this may be a bug with the fsc some how. Although it is one of the oddest I have ever seen. I am working with Scala 2.8 straight from the nightly build so it might be related. I will do some investigating
Jesse
On Mar 3, 2010, at 11:40 PM, Alex Boisvert wrote:
> Hi Jesse,
>
> Not sure what's going on with fsc... I'll give it a try later today.
>
> alex
>
>
> On Wed, Mar 3, 2010 at 1:43 PM, Jesse Eichar <je...@camptocamp.com>wrote:
>
>> Hi,
>>
>> I got things working. I am using:
>>
>>> test.using(:junit)
>>> test.with('org.scala-tools.testing:specs_2.8.0.Beta1:jar:1.6.3')
>>
>> But it turned out the problem was:
>>
>>> ENV["USE_FSC"] = "true"
>>
>> I am not sure why but I commented out that line and now the tests run as
>> expected... Compiling is a lot slower though. Is there a way to have that
>> only apply during the normal compile phase?
>>
>> Jesse
>>
>> On Mar 3, 2010, at 4:47 PM, Jesse Eichar wrote:
>>
>>> Hi,
>>>
>>> I am trying out Buildr with a Scala 2.8 project. Making the project
>> compile is simple (well done!).
>>>
>>> However I am trying to executes my Scala Specs. To do this I must use
>> the correct Specs version and build. The maven dependency is:
>>>
>>> org.scala-tools.testing:specs_2.8.0.Beta1:jar:1.6.3
>>>
>>> I tried with this test dependency and without but it fails to compile for
>> some reason. I have also tried to test with junit:
>>>
>>> The scala code in src/main/scala compiles without a glitch so that is not
>> the problem. Here is the test configuration a few configurations I have
>> tried:
>>>
>>>>
>> test.using(:junit).with("org.scala-tools.testing:specs_2.8.0.Beta1:jar:1.6.3")
>>>
>>>> test.using(:specs)
>>>
>>>>
>> test.using(:specs).with('org.scala-tools.testing:specs_2.8.0.Beta1:jar:1.6.3')
>>>
>>>
>>> The two attempts using :specs I did not expect to succeed.
>>>
>>> But the junit configuration I did expect to pass. When I manually
>> execute the scalac command it compiles but buildr fails with:
>>>
>>>>
>> /Users/jeichar/Local_Projects/maven-project-creator/src/test/scala/XmlStrategySpec.scala:2:
>> error: value specs is not a member of package org
>>>> import org.specs._
>>>> ^
>>>>
>> /Users/jeichar/Local_Projects/maven-project-creator/src/test/scala/XmlStrategySpec.scala:7:
>> error: value should is not a member of java.lang.String
>>>> "XmlStrategy" should {
>>>> ^
>>>> [typer in 51ms]
>>>> [total in 64ms]
>>>> two errors found
>>>
>>> Is there any funny stuff going on that I am missing?
>>>
>>> Is there anyway that I can override the version of Specs and ScalaCheck
>> that are added to the classpath?
>>>
>>>
>>> Jesse
>>
>>
Re: Scala Specs on Scala2.8
Posted by Alex Boisvert <al...@gmail.com>.
Hi Jesse,
Not sure what's going on with fsc... I'll give it a try later today.
alex
On Wed, Mar 3, 2010 at 1:43 PM, Jesse Eichar <je...@camptocamp.com>wrote:
> Hi,
>
> I got things working. I am using:
>
> > test.using(:junit)
> > test.with('org.scala-tools.testing:specs_2.8.0.Beta1:jar:1.6.3')
>
> But it turned out the problem was:
>
> > ENV["USE_FSC"] = "true"
>
> I am not sure why but I commented out that line and now the tests run as
> expected... Compiling is a lot slower though. Is there a way to have that
> only apply during the normal compile phase?
>
> Jesse
>
> On Mar 3, 2010, at 4:47 PM, Jesse Eichar wrote:
>
> > Hi,
> >
> > I am trying out Buildr with a Scala 2.8 project. Making the project
> compile is simple (well done!).
> >
> > However I am trying to executes my Scala Specs. To do this I must use
> the correct Specs version and build. The maven dependency is:
> >
> > org.scala-tools.testing:specs_2.8.0.Beta1:jar:1.6.3
> >
> > I tried with this test dependency and without but it fails to compile for
> some reason. I have also tried to test with junit:
> >
> > The scala code in src/main/scala compiles without a glitch so that is not
> the problem. Here is the test configuration a few configurations I have
> tried:
> >
> >>
> test.using(:junit).with("org.scala-tools.testing:specs_2.8.0.Beta1:jar:1.6.3")
> >
> >> test.using(:specs)
> >
> >>
> test.using(:specs).with('org.scala-tools.testing:specs_2.8.0.Beta1:jar:1.6.3')
> >
> >
> > The two attempts using :specs I did not expect to succeed.
> >
> > But the junit configuration I did expect to pass. When I manually
> execute the scalac command it compiles but buildr fails with:
> >
> >>
> /Users/jeichar/Local_Projects/maven-project-creator/src/test/scala/XmlStrategySpec.scala:2:
> error: value specs is not a member of package org
> >> import org.specs._
> >> ^
> >>
> /Users/jeichar/Local_Projects/maven-project-creator/src/test/scala/XmlStrategySpec.scala:7:
> error: value should is not a member of java.lang.String
> >> "XmlStrategy" should {
> >> ^
> >> [typer in 51ms]
> >> [total in 64ms]
> >> two errors found
> >
> > Is there any funny stuff going on that I am missing?
> >
> > Is there anyway that I can override the version of Specs and ScalaCheck
> that are added to the classpath?
> >
> >
> > Jesse
>
>
Re: Scala Specs on Scala2.8
Posted by Jesse Eichar <je...@camptocamp.com>.
Hi,
I got things working. I am using:
> test.using(:junit)
> test.with('org.scala-tools.testing:specs_2.8.0.Beta1:jar:1.6.3')
But it turned out the problem was:
> ENV["USE_FSC"] = "true"
I am not sure why but I commented out that line and now the tests run as expected... Compiling is a lot slower though. Is there a way to have that only apply during the normal compile phase?
Jesse
On Mar 3, 2010, at 4:47 PM, Jesse Eichar wrote:
> Hi,
>
> I am trying out Buildr with a Scala 2.8 project. Making the project compile is simple (well done!).
>
> However I am trying to executes my Scala Specs. To do this I must use the correct Specs version and build. The maven dependency is:
>
> org.scala-tools.testing:specs_2.8.0.Beta1:jar:1.6.3
>
> I tried with this test dependency and without but it fails to compile for some reason. I have also tried to test with junit:
>
> The scala code in src/main/scala compiles without a glitch so that is not the problem. Here is the test configuration a few configurations I have tried:
>
>> test.using(:junit).with("org.scala-tools.testing:specs_2.8.0.Beta1:jar:1.6.3")
>
>> test.using(:specs)
>
>> test.using(:specs).with('org.scala-tools.testing:specs_2.8.0.Beta1:jar:1.6.3')
>
>
> The two attempts using :specs I did not expect to succeed.
>
> But the junit configuration I did expect to pass. When I manually execute the scalac command it compiles but buildr fails with:
>
>> /Users/jeichar/Local_Projects/maven-project-creator/src/test/scala/XmlStrategySpec.scala:2: error: value specs is not a member of package org
>> import org.specs._
>> ^
>> /Users/jeichar/Local_Projects/maven-project-creator/src/test/scala/XmlStrategySpec.scala:7: error: value should is not a member of java.lang.String
>> "XmlStrategy" should {
>> ^
>> [typer in 51ms]
>> [total in 64ms]
>> two errors found
>
> Is there any funny stuff going on that I am missing?
>
> Is there anyway that I can override the version of Specs and ScalaCheck that are added to the classpath?
>
>
> Jesse