- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
sbt11/scala-2.9.1 code coverage?
Wed, 2012-01-11, 17:11
Greetings,
Does anyone have a good recipe for code coverage with sbt-11 and
scala-2.9.1? I was happily using scct with sbt-7 and scala-2.8 but
getting it to work with sbt-11 seems non-trivial (for me at least).
Does anyone here use scct in this way? Some other tool? I would love a
pointer to someone's github project which is doing code coverage with
sbt-11/scala-2.9.1.
Thanks,
Wed, 2012-01-11, 17:41
#2
Re: sbt11/scala-2.9.1 code coverage?
On Wed, Jan 11, 2012 at 4:19 PM, Ismael Juma <ismael@juma.me.uk> wrote:
Oh, I noticed that this was merged to the main fork, so sorry for the noise.
Best,Ismael
https://github.com/quelgar/sbt-scct
Oh, I noticed that this was merged to the main fork, so sorry for the noise.
Best,Ismael
Wed, 2012-01-11, 19:31
#3
Re: sbt11/scala-2.9.1 code coverage?
On Wed, Jan 11, 2012 at 04:24:04PM +0000, Ismael Juma wrote:
> On Wed, Jan 11, 2012 at 4:19 PM, Ismael Juma wrote:
> >
> > https://github.com/quelgar/sbt-scct
> >
>
> Oh, I noticed that this was merged to the main fork, so sorry for the noise.
Ismael,
Thanks for your response. Have you been using the fork? I'm not having
any luck getting the plugin enabled in sbt11 (following a combining
of the README's instructions and the SBT wiki).
Wed, 2012-01-11, 19:41
#4
Re: sbt11/scala-2.9.1 code coverage?
On Wed, Jan 11, 2012 at 01:23:07PM -0500, Erik Osheim wrote:
> Thanks for your response. Have you been using the fork? I'm not having
> any luck getting the plugin enabled in sbt11 (following a combining
> of the README's instructions and the SBT wiki).
(To clarify: it seems like that the fork only works with sbt-10. At
least, I can't get it working with sbt-11. I am probably going to put
this down for now but was just wondering what other people are doing.)
Wed, 2012-01-11, 21:21
#5
Re: sbt11/scala-2.9.1 code coverage?
On Wed, Jan 11, 2012 at 14:11, Erik Osheim wrote:
> Greetings,
>
> Does anyone have a good recipe for code coverage with sbt-11 and
> scala-2.9.1? I was happily using scct with sbt-7 and scala-2.8 but
> getting it to work with sbt-11 seems non-trivial (for me at least).
>
> Does anyone here use scct in this way? Some other tool? I would love a
> pointer to someone's github project which is doing code coverage with
> sbt-11/scala-2.9.1.
There are two plugins listed in the wiki. Have you tested both?
Wed, 2012-01-11, 22:11
#6
Re: sbt11/scala-2.9.1 code coverage?
On Wed, Jan 11, 2012 at 06:15:42PM -0200, Daniel Sobral wrote:
> There are two plugins listed in the wiki. Have you tested both?
I only saw the one plugin at:
https://github.com/dvc94ch/sbt-scct
I guess a deeper problem is that I don't really understand SBT plugins
well-enough to debug when they're not working. The final line from the
previous link's instructions doesn't seem to work for me, and I've
(haphazardly) tried a bunch of the strategies (without luck) from:
https://github.com/harrah/xsbt/wiki/Plugins
While this might very well be PEBKAC it's a bit frustrating that this
was so much easier previously (in sbt7). That's why I was wondering if
anyone else is actually using scct or has set this up correctly with
sbt11.
Thanks,
Wed, 2012-01-11, 22:41
#7
Re: sbt11/scala-2.9.1 code coverage?
There's also a jacoco plugin listed at
https://github.com/harrah/xsbt/wiki/sbt-0.10-plugins-list under code
coverage.
On Wed, Jan 11, 2012 at 19:02, Erik Osheim wrote:
> On Wed, Jan 11, 2012 at 06:15:42PM -0200, Daniel Sobral wrote:
>> There are two plugins listed in the wiki. Have you tested both?
>
> I only saw the one plugin at:
>
> https://github.com/dvc94ch/sbt-scct
>
> I guess a deeper problem is that I don't really understand SBT plugins
> well-enough to debug when they're not working. The final line from the
> previous link's instructions doesn't seem to work for me, and I've
> (haphazardly) tried a bunch of the strategies (without luck) from:
>
> https://github.com/harrah/xsbt/wiki/Plugins
>
> While this might very well be PEBKAC it's a bit frustrating that this
> was so much easier previously (in sbt7). That's why I was wondering if
> anyone else is actually using scct or has set this up correctly with
> sbt11.
>
> Thanks,
>
Thu, 2012-01-12, 07:41
#8
Re: sbt11/scala-2.9.1 code coverage?
That's looking interesting but doesn't work on sub-projects yet. Scct doesn't either for that matter, it hangs on sub-projects in a loop looking for changes in system properties that aren't seemingly ever changed at that time.
(seems like a task ordering issue but I have not been able to spend enough time on it to tell).
On Jan 11, 2012 10:31 PM, "Daniel Sobral" <dcsobral@gmail.com> wrote:There's also a jacoco plugin listed at
https://github.com/harrah/xsbt/wiki/sbt-0.10-plugins-list under code
coverage.
On Wed, Jan 11, 2012 at 19:02, Erik Osheim <erik@plastic-idolatry.com> wrote:
> On Wed, Jan 11, 2012 at 06:15:42PM -0200, Daniel Sobral wrote:
>> There are two plugins listed in the wiki. Have you tested both?
>
> I only saw the one plugin at:
>
> https://github.com/dvc94ch/sbt-scct
>
> I guess a deeper problem is that I don't really understand SBT plugins
> well-enough to debug when they're not working. The final line from the
> previous link's instructions doesn't seem to work for me, and I've
> (haphazardly) tried a bunch of the strategies (without luck) from:
>
> https://github.com/harrah/xsbt/wiki/Plugins
>
> While this might very well be PEBKAC it's a bit frustrating that this
> was so much easier previously (in sbt7). That's why I was wondering if
> anyone else is actually using scct or has set this up correctly with
> sbt11.
>
> Thanks,
>
> -- Erik
--
Daniel C. Sobral
I travel to the future all the time.
Thu, 2012-01-12, 13:51
#9
Re: sbt11/scala-2.9.1 code coverage?
On Thu, Jan 12, 2012 at 04:31, Chris Twiner wrote:
> That's looking interesting but doesn't work on sub-projects yet. Scct
> doesn't either for that matter, it hangs on sub-projects in a loop looking
> for changes in system properties that aren't seemingly ever changed at that
> time.
>
> (seems like a task ordering issue but I have not been able to spend enough
> time on it to tell).
You should take this to the SBT mailing list. It's a fairly active
group, and people usually get their problems solved there.
Fri, 2012-01-13, 21:21
#10
Re: sbt11/scala-2.9.1 code coverage?
On Wed, Jan 11, 2012 at 11:11:47AM -0500, Erik Osheim wrote:
> Does anyone here use scct in this way? Some other tool? I would love a
> pointer to someone's github project which is doing code coverage with
> sbt-11/scala-2.9.1.
Thanks to everyone who responded and helped out.
Just to follow up on my original post, I did get the sbt-scct project
[1] working for me. The big thing I had missed was syncing up the
build.settings sbt version in both the sbt-scct project and my own
project. Even when one was 0.11.0 and one was 0.11.2 things didn't
work. I should have realized this but didn't.
I also hadn't realized that you could have both build.sbt and
project/Build.scala (which we had already been using for some custom
caliper code). Now that I look I do see SBT documentation pointing this
out, so this was just my own ignorance.
I hope to write up a document that explains how to do this from start
to finish with all the necessary steps included, and submit it as a
patch for sbt-scct.
Anyway, thanks again for everyone's help!
Thu, 2012-01-19, 16:01
#11
Re: sbt11/scala-2.9.1 code coverage?
I was struggling with this same problem yesterday. Here's what I
finally did to get sbt to pick up my "coverage:" tasks:
#1> I did a git clone git@github.com:dvc94ch/sbt-scct.git into my
project directory
#2> I edited sbt-scct/project/build.properties to point to be:
sbt.version=0.11.2 and compiled using sbt 11.2
#3> I did a sbt publish-local in the sbt-scct project
#4> I edited my project/plugins.sbt and added:
addSbtPlugin("ch.craven" %% "scct-plugin" % "0.2")
#5> then I appendedmScctPlugin.scctSettings to my project's build
settings , i.e.
lazy val myProj = Project (
id = "myProj",
base = file ("."),
settings = buildSettings ++ ScctPlugin.scctSettings
)
On Jan 13, 3:15 pm, Erik Osheim wrote:
> On Wed, Jan 11, 2012 at 11:11:47AM -0500, Erik Osheim wrote:
> > Does anyone here use scct in this way? Some other tool? I would love a
> > pointer to someone's github project which is doing code coverage with
> > sbt-11/scala-2.9.1.
>
> Thanks to everyone who responded and helped out.
>
> Just to follow up on my original post, I did get the sbt-scct project
> [1] working for me. The big thing I had missed was syncing up the
> build.settings sbt version in both the sbt-scct project and my own
> project. Even when one was 0.11.0 and one was 0.11.2 things didn't
> work. I should have realized this but didn't.
>
> I also hadn't realized that you could have both build.sbt and
> project/Build.scala (which we had already been using for some custom
> caliper code). Now that I look I do see SBT documentation pointing this
> out, so this was just my own ignorance.
>
> I hope to write up a document that explains how to do this from start
> to finish with all the necessary steps included, and submit it as a
> patch for sbt-scct.
>
> Anyway, thanks again for everyone's help!
>
Have you seen:
https://github.com/quelgar/sbt-scct
Best, Ismael