Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source directories must not be nested #73

Closed
martinhrvn opened this issue Dec 14, 2015 · 14 comments
Closed

Source directories must not be nested #73

martinhrvn opened this issue Dec 14, 2015 · 14 comments

Comments

@martinhrvn
Copy link

Hi,
I'm trying a very simple build with coveralls, but it fails with this error:
ava.lang.IllegalArgumentException: requirement failed: Source directories must not be nested

It's a single module buils and contains one src/main/scala directory

build.sbt only contains:

lazy val sprayVersion = "1.3.2"
organization := "com.example"
version := "0.1.0"
scalaVersion := "2.11.5"
name := "coveralls-test"
libraryDependencies ++= Seq(
"commons-codec" % "commons-codec" % "1.10",
"io.spray" %% "spray-json" % sprayVersion,
"io.spray" %% "spray-client" % sprayVersion,
"com.typesafe.scala-logging" %% "scala-logging" % "3.1.0",
"ch.qos.logback" % "logback-classic" % "1.1.3",
"ch.qos.logback" % "logback-core" % "1.1.3",
"com.typesafe.akka" %% "akka-actor" % "2.3.14",
"org.scalatest" %% "scalatest" % "2.2.4" % Test,
"junit" % "junit" % "4.12" % Test,
"org.pegdown" % "pegdown" % "1.1.0" % Test)

Any ideas?

@earldouglas
Copy link
Contributor

I just ran into this as well. It looks like isChild will detect any given directory as a child of itself. Consider using sbt.IO.relativize instead.

lloydmeta added a commit to lloydmeta/shade that referenced this issue Dec 20, 2015
Currently the Travis job fails (https://travis-ci.org/alexandru/shade/jobs/97903369#L505)
to send coverage to Coveralls.io because of a bug in the plugin as mentioned in this
issue scoverage/sbt-coveralls#73.

Let's try downgrading by 1 version to see if it gets fixed.
lloydmeta added a commit to lloydmeta/shade that referenced this issue Dec 20, 2015
Currently the Travis job fails (https://travis-ci.org/alexandru/shade/jobs/97903369#L505)
to send coverage to Coveralls.io because of a bug in the plugin as mentioned in this
issue scoverage/sbt-coveralls#73.

Let's try downgrading by 1 version to see if it gets fixed.

Downgrade Scoverage too as apparently that needs to be compatible
with our version of Coveralls

Add a note regarding SBT-Scoverage and SBT-coveralls compatibility
@reid-spencer
Copy link

This is biting me too. Looks like I'm headed for a downgrade of sbt-scoverage and sbt-coveralls plugins as well. 👎

@AndrewWhitaker
Copy link
Contributor

What's odd is that there's a test case that explicitly checks to make sure that the result of calling isChild with identical child and parent is true. Is this by design? The fix is easy enough, like @earldouglas pointed out.

@earldouglas
Copy link
Contributor

Is this by design?

It does appear to be by design, however only the one test case appears to rely on it.

This could be addressed simply by changing isChild to:

def isChild(child: File, parent: File): Boolean =
  sbt.IO.relativize(parent, child).isDefined

and changing that test case to expect false.

@jackewitz
Copy link

I just ran into this as well with:

  • sbt-scoverage 1.3.3
  • sbt-coveralls 1.0.3

Which versions should I use to get your bugfix? Have you released a stable version of sbt-coveralls (or combination of sbt-scoverage and sbt-coveralls) already?

@zzztimbo
Copy link

I'm using the same versions as @jackewitz and having the same issues.

@zzztimbo
Copy link

@jackewitz this pull request answers your questions about which versions to use:

https://github.com/alexandru/shade/pull/21/files

alexandru pushed a commit to monix/shade that referenced this issue Jan 15, 2016
Currently the Travis job fails (https://travis-ci.org/alexandru/shade/jobs/97903369#L505)
to send coverage to Coveralls.io because of a bug in the plugin as mentioned in this
issue scoverage/sbt-coveralls#73.

Let's try downgrading by 1 version to see if it gets fixed.

Downgrade Scoverage too as apparently that needs to be compatible
with our version of Coveralls

Add a note regarding SBT-Scoverage and SBT-coveralls compatibility
alexandru pushed a commit to monix/shade that referenced this issue Jan 15, 2016
Currently the Travis job fails (https://travis-ci.org/alexandru/shade/jobs/97903369#L505)
to send coverage to Coveralls.io because of a bug in the plugin as mentioned in this
issue scoverage/sbt-coveralls#73.

Let's try downgrading by 1 version to see if it gets fixed.

Downgrade Scoverage too as apparently that needs to be compatible
with our version of Coveralls

Add a note regarding SBT-Scoverage and SBT-coveralls compatibility
olafurpg added a commit to scalameta/scalafmt that referenced this issue Jan 15, 2016
Using old version of sbt-coveralls until scoverage/sbt-coveralls#73 is
released.
plamola pushed a commit to dekkr/feedfrenzy-backend that referenced this issue Jan 18, 2016
@zzztimbo
Copy link

Has anyone run into this issue after downgrading? #56

@ozoli
Copy link

ozoli commented Jan 22, 2016

@zzztimbo I had no issues using the versions shown in the pull request ie.

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.0.1")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.0.0")

@jackewitz
Copy link

I had no issues using the versions shown at @ozoli comment. Great. :-)

janschultecom added a commit to janschultecom/akvokolekta that referenced this issue Feb 2, 2016
nh13 added a commit to fulcrumgenomics/dagr that referenced this issue Feb 3, 2016
KaiHofstetter added a commit to KaiHofstetter/nine-mens-morris that referenced this issue Feb 3, 2016
nh13 added a commit to fulcrumgenomics/dagr that referenced this issue Feb 4, 2016
@jeffmay
Copy link

jeffmay commented Feb 4, 2016

I just encountered this with sbt-scoverage 1.3.5 and sbt-coveralls 1.0.3 as well.
My fix was to downgrade to sbt-scoverage 1.0.1 and sbt-coveralls 1.0.0 as recommended as well.

tscholak added a commit to tscholak/fpscala that referenced this issue Feb 16, 2016
tscholak added a commit to tscholak/fpscala that referenced this issue Feb 16, 2016
@ruippeixotog
Copy link
Contributor

Despite being closed, this issue still affects many users as there's no published version of the two plugins since then. I'll have to downgrade them in my project too, but downgrading from sbt-scoverage 1.3.5 to 1.0.3 seems a big jump... @sksamuel, is there any idea of when might you release a new version?

ruippeixotog added a commit to ruippeixotog/scala-scraper that referenced this issue Feb 27, 2016
@sksamuel
Copy link
Member

I've put coveralls 1.1.0 onto maven central (note: not bintray)

@ruippeixotog
Copy link
Contributor

@sksamuel thank you for your quick action, I was able to make it work now with sbt-scoverage 1.3.5 and sbt-coveralls 1.1.0!

However, I had to run coverageReport between the test and coverall tasks. Otherwise, I get a java.io.FileNotFoundException on coveralls, saying that it didn't found coverage-report/cobertura.xml. Is running coverageReport now required? If so, can you update the README so that it includes this?

Thank you once more!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants