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

Scoverage can't compile modules with moduleDeps #622

Closed
nrktkt opened this issue May 31, 2019 · 0 comments · Fixed by #623
Closed

Scoverage can't compile modules with moduleDeps #622

nrktkt opened this issue May 31, 2019 · 0 comments · Fixed by #623
Labels
solved The issue was fixed/resolved
Milestone

Comments

@nrktkt
Copy link
Contributor

nrktkt commented May 31, 2019

mill amodule.scoverage.compile will not work for any amodule that has defined moduleDeps. I suspect the scoverage module needs to def moduleDeps = outer.moduleDeps.

build file to reproduce:
(also need to create a class in foo and import it in the other project)

// build.sc

import $ivy.`com.lihaoyi::mill-contrib-buildinfo:0.4.0`
import mill.contrib.scoverage.ScoverageModule

object foo extends ScalaModule {
  def scalaVersion = "2.12.7"
}

object scoverageSadness extends ScalaModule with ScoverageModule {
  def scoverageVersion = "1.3.1"
  def scalaVersion = "2.12.7"

  def moduleDeps = Seq(foo)

  object test extends ScoverageTests {
    def ivyDeps = Agg(ivy"org.scalatest::scalatest:3.0.5")
    def testFrameworks = Seq("org.scalatest.tools.Framework")
  }
}

run scoverageSadness.compile to confirm it works, then run scoverageSadness.scoverage.compile to confirm not found errors on imports.

Does that diagnosis sound right @nvander1?

PS: thanks for the scoverage PR, very handy.

lihaoyi pushed a commit that referenced this issue Jun 2, 2019
* Add test case that breaks via #622

Thanks to @kag0 for finding this! :)

* Scoverage should inherit moduleDeps
@lefou lefou added this to the after 0.4.0 milestone Jun 3, 2019
@lefou lefou added the solved The issue was fixed/resolved label Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved The issue was fixed/resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants