I am on Red Hat 5, and I am using Scala 2.8 with the latest
experimental sbt. I set up a directory with the required structure and
several Scala source files in the src/main/scala directory. My sbt
script is an exact copy of the script shown on the Setup page. I
created a "Hello World" task very similar to the example:
import sbt._
class MyProject(info: ProjectInfo) extends DefaultProject(info) {
lazy val hi = task { println("Hello, Worlds"); None }
}
It prints it's message just fine. Here is where I am stuck. Shouldn't
I be able to type
> sbt compile
and have my source files compile? When I type that, it says "Nothing
to compile," and nothing gets compiled. What step did I miss? Thanks.
Russ P.
If you have already compiled your sources, you might see something like:
[info] == compile ==
[info] Source analysis: 0 new/modified, 0 indirectly invalidated, 0 removed.
[info] Compiling main sources...
[info] Nothing to compile.
[info] Post-analysis: 2 classes.
[info] == compile ==
Note the Post-analysis: 2 classes, which means that your sources were already
compiled. The 0 modified, etc... mean all sources are uptodate.
If you see Post-analysis: 0 classes, I'm not sure what the problem is. You
could zip up your project (no need to include project/boot), post it to the
files section [1], and I'll see if it works for me.
Thanks,
Mark
--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.
Russ> Now I'm trying to figure out how to use sbt to automatically run
Russ> tests. Every step seems to baffle me. A few examples in the
Russ> documentation would be helpful.
Russ> I have everything set up, with a couple of tests in the
Russ> src/test/scala directory, and I successfully compiled them with
Russ> sbt test-compile
Russ> Then I ran
Russ> sbt test
Russ> and it said "no tests to run." The docs say this "Runs all tests
Russ> detected during compilation." How do I tell it which tests to
Russ> run? Do I need to put something in my project file? Thanks.
What do your tests look like? Which test framework are you using?
--
Seth Tisue @ Northwestern University | http://tisue.net
lead developer, NetLogo: http://ccl.northwestern.edu/netlogo/
--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.
Here's another question. Mark told me how to run sbt with Scala 2.8
RC5. When I did that, sbt must have automatically installed that
version of Scala for me, but I can't find it. Can someone give me a
clue where to find it so I can make it my default Scala version?
Thanks.
Russ P.
On Dec 25, 11:14 am, Josh Cough <joshco...@gmail.com> wrote:
> in that case you should be able to run the test-run task at the sbt console.
> or sbt test-run from bash or whatever.
>
> test-run finds classes with main methods in the test sources.
> test runs subclasses of the test frameworks (scalatest, specs, scalacheck
> and more can be added)
>
> let us know if that works, and if you want to move to one of the test
> frameworks we can help with that too.
>
> On Fri, Dec 25, 2009 at 12:40 PM, Russ Paielli <russ.paie...@gmail.com>wrote:
>
> > At this point, my tests are just Scala files with a "main" method and lots
> > of "asserts." The code I am testing has no main method, by the way. It is
> > just "library" code.
>
> > On Fri, Dec 25, 2009 at 6:20 AM, Seth Tisue <s...@tisue.net> wrote:
>
> >> >>>>> "Russ" == Russ Paielli <russ.paie...@gmail.com> writes:
>
> >> Russ> Now I'm trying to figure out how to use sbt to automatically run
> >> Russ> tests. Every step seems to baffle me. A few examples in the
> >> Russ> documentation would be helpful.
> >> Russ> I have everything set up, with a couple of tests in the
> >> Russ> src/test/scala directory, and I successfully compiled them with
> >> Russ> sbt test-compile
> >> Russ> Then I ran
> >> Russ> sbt test
> >> Russ> and it said "no tests to run." The docs say this "Runs all tests
> >> Russ> detected during compilation." How do I tell it which tests to
> >> Russ> run? Do I need to put something in my project file? Thanks.
>
> >> What do your tests look like? Which test framework are you using?
>
> >> --
> >> Seth Tisue @ Northwestern University |http://tisue.net
> >> lead developer, NetLogo:http://ccl.northwestern.edu/netlogo/
>
> >> --
>
> >> You received this message because you are subscribed to the Google Groups
> >> "simple-build-tool" group.
> >> To post to this group, send email to simple-b...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> simple-build-t...@googlegroups.com<simple-build-tool%2Bunsu...@googlegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/simple-build-tool?hl=en.
>
> > --
> >http://RussP.us
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "simple-build-tool" group.
> > To post to this group, send email to simple-b...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > simple-build-t...@googlegroups.com<simple-build-tool%2Bunsu...@googlegroups.com>
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
Russ> Hey, test-run worked fine. Thanks. Here's another question. Mark
Russ> told me how to run sbt with Scala 2.8 RC5. When I did that, sbt
Russ> must have automatically installed that version of Scala for me,
Russ> but I can't find it. Can someone give me a clue where to find it
Russ> so I can make it my default Scala version? Thanks.
It only pulls down the compiler and library jars (to
project/boot/scala-2.8.0.Beta1-RC5/lib), not the entire distribution.
Russ P.
sbt uses ANSI escape sequences. The exact color of blue is set by your
terminal, which you can probably configure there.
-Mark