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

Issue with custom repositories when trying to use Scoverage #620

Closed
jacarey opened this issue May 28, 2019 · 4 comments
Closed

Issue with custom repositories when trying to use Scoverage #620

jacarey opened this issue May 28, 2019 · 4 comments
Labels
solved The issue was fixed/resolved
Milestone

Comments

@jacarey
Copy link

jacarey commented May 28, 2019

Using two simple build files:

The following works fine:

import mill._
import mill.scalalib._
import ammonite.ops._
import mill.contrib.scoverage.ScoverageModule

private val dagrVersion             = "0.6.0-b2189cf-SNAPSHOT"
private val scalatestVersion        = "3.0.5"

object commons extends ScoverageModule {
    def scoverageVersion = "1.3.1"
    def scalaVersion = "2.12.2"

    def repositories = super.repositories ++ Seq(
      MavenRepository("https://oss.sonatype.org/content/repositories/public"),
    )

    def ivyDeps = Agg(
      ivy"com.fulcrumgenomics::dagr-tasks::$dagrVersion",
    )

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

this does not

import coursier.maven.MavenRepository
import mill._
import mill.scalalib._
import ammonite.ops._
import mill.contrib.scoverage.ScoverageModule

private val dagrVersion             = "0.6.0-b2189cf-SNAPSHOT"
private val scalatestVersion        = "3.0.5"

object commons extends ScoverageModule {
    def scoverageVersion = "1.3.1"
    def scalaVersion = "2.12.2"

    def repositories = super.repositories ++ Seq(
      MavenRepository("https://oss.sonatype.org/content/repositories/public"),
    )

    def ivyDeps = Agg(
      ivy"com.fulcrumgenomics::dagr-tasks::$dagrVersion",
    )

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

The only difference is that the second build file test extends ScoverageTests instead of Tests.

Output from first build file:

mill commons.test
[31/56] commons.compile
warning: there were three deprecation warnings (since 2.12.0); re-run with -deprecation for details
warning: there were three feature warnings; re-run with -feature for details
two warnings found
[56/56] commons.test.test

Output from the second build file:

mill commons.test
[30/71] commons.scoverage.compileClasspath | Downloading [8/8] artifacts (~0/0 bytes)
1 targets failed
commons.scoverage.compileClasspath
Resolution failed for 1 modules:
--------------------------------------------
  com.fulcrumgenomics:dagr-tasks_2.12:0.6.0-b2189cf-SNAPSHOT
       not found: /home/ec2-user/.ivy2/local/com.fulcrumgenomics/dagr-tasks_2.12/0.6.0-b2189cf-SNAPSHOT/ivys/ivy.xml
       not found: https://repo1.maven.org/maven2/com/fulcrumgenomics/dagr-tasks_2.12/0.6.0-b2189cf-SNAPSHOT/dagr-tasks_2.12-0.6.0-b2189cf-SNAPSHOT.pom
       not found: https://oss.sonatype.org/content/repositories/releases/com/fulcrumgenomics/dagr-tasks_2.12/0.6.0-b2189cf-SNAPSHOT/dagr-tasks_2.12-0.6.0-b2189cf-SNAPSHOT.pom

Let me know if I can provide any more information or help testing.

@clintval
Copy link

clintval commented Jun 5, 2019

I hit this recently too. @nvander1, have you encountered this yet?

@krcz
Copy link
Contributor

krcz commented Jul 2, 2019

I have created a pull request with a fix for this (tested locally): #645.

@nvander1
Copy link
Contributor

nvander1 commented Jul 3, 2019

@lefou Can we mark this as closed?

@lefou
Copy link
Member

lefou commented Jul 3, 2019

Yep, we can.

@lefou lefou closed this as completed Jul 3, 2019
@lefou lefou added this to the after-0.4.2 milestone Jul 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

No branches or pull requests

5 participants