From f04735a5a7d50516120dfd98d0c000f724ebe36e Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Sun, 11 Feb 2018 02:17:45 -0800 Subject: fixes --- build.sc | 13 ++++++------- integration/test/resources/ammonite/build.sc | 14 +++++++++++--- integration/test/resources/better-files/build.sc | 4 ++-- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/build.sc b/build.sc index b55e0ca0..e862683c 100755 --- a/build.sc +++ b/build.sc @@ -73,7 +73,7 @@ object core extends MillModule { ) def generatedSources = T { - shared.generateCoreSources(T.ctx().dest) + Seq(PathRef(shared.generateCoreSources(T.ctx().dest))) } } @@ -85,13 +85,13 @@ object main extends MillModule { ) def generatedSources = T { - shared.generateCoreSources(T.ctx().dest) + Seq(PathRef(shared.generateCoreSources(T.ctx().dest))) } val test = new Tests(implicitly) class Tests(ctx0: mill.define.Ctx) extends super.Tests(ctx0){ def generatedSources = T { - shared.generateCoreTestSources(T.ctx().dest) + Seq(PathRef(shared.generateCoreTestSources(T.ctx().dest))) } } } @@ -117,9 +117,8 @@ object scalalib extends MillModule { ) def genTask(m: ScalaModule) = T.task{ - Seq(m.jar(), m.sourcesJar()) ++ - m.externalCompileDepClasspath() ++ - m.externalCompileDepSources() + Seq(m.jar(), m.sourceJar()) ++ + m.runClasspath() } def testArgs = T{ @@ -237,7 +236,7 @@ def publishVersion = T.input{ val latestTaggedVersion = %%('git, 'describe, "--abbrev=0", "--tags")(pwd).out.trim val commitsSinceLastTag = - %%('git, "rev-list", 'master, "--count")(pwd).out.trim.toInt - + %%('git, "rev-list", gitHead(), "--count")(pwd).out.trim.toInt - %%('git, "rev-list", latestTaggedVersion, "--count")(pwd).out.trim.toInt ("unstable", s"$latestTaggedVersion-$commitsSinceLastTag-${gitHead().take(6)}") diff --git a/integration/test/resources/ammonite/build.sc b/integration/test/resources/ammonite/build.sc index fd802ddf..4594cd9f 100644 --- a/integration/test/resources/ammonite/build.sc +++ b/integration/test/resources/ammonite/build.sc @@ -13,6 +13,10 @@ trait AmmModule extends mill.scalalib.CrossSbtModule{ def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.6.0") def testFramework = "utest.runner.Framework" } + def allIvyDeps = T{transitiveIvyDeps() ++ scalaLibraryIvyDeps()} + def externalSources = T{ + resolveDeps(allIvyDeps, sources = true)() + } } object ops extends Cross[OpsModule](binCrossScalaVersions:_*) @@ -44,6 +48,10 @@ object amm extends Cross[MainModule](fullCrossScalaVersions:_*){ ivy"com.lihaoyi::pprint:0.5.2", ivy"com.lihaoyi::fansi:0.2.4" ) + def compileIvyDeps = Agg( + ivy"org.scala-lang:scala-reflect:$crossScalaVersion" + ) + } @@ -59,7 +67,7 @@ object amm extends Cross[MainModule](fullCrossScalaVersions:_*){ def generatedSources = T{ import ammonite.ops._ cp(build.millSourcePath/'project/"Constants.scala", T.ctx().dest/"Constants.scala") - T.ctx().dest + Seq(PathRef(T.ctx().dest)) } } @@ -91,7 +99,7 @@ object amm extends Cross[MainModule](fullCrossScalaVersions:_*){ def resources = T.sources { super.resources() ++ ReplModule.this.sources() ++ - ReplModule.this.externalCompileDepSources() + ReplModule.this.externalSources() } } } @@ -118,7 +126,7 @@ class MainModule(val crossScalaVersion: String) extends AmmModule{ amm.interp().sources() ++ amm.repl().sources() ++ sources() ++ - externalCompileDepSources() + externalSources() diff --git a/integration/test/resources/better-files/build.sc b/integration/test/resources/better-files/build.sc index 582d3400..425e70ea 100644 --- a/integration/test/resources/better-files/build.sc +++ b/integration/test/resources/better-files/build.sc @@ -27,7 +27,7 @@ trait BetterFilesModule extends SbtModule{ "-Xlint:nullary-unit", // Warn when nullary methods return Unit. "-Xlint:option-implicit", // Option.apply used implicit view. "-Xlint:package-object-classes", // Class or object defined in package object. - "-Xlint:poly-implicit-overload", // Parameterized overloaded implicit methods are not visible as view bounds. + "-Xlint:poly-implicit-o¡verload", // Parameterized overloaded implicit methods are not visible as view bounds. "-Xlint:private-shadow", // A private field (or class parameter) shadows a superclass field. "-Xlint:stars-align", // Pattern sequence wildcard must align with sequence component. "-Xlint:type-parameter-shadow", // A local type parameter shadows a type already in scope. @@ -76,7 +76,7 @@ object benchmarks extends BetterFilesModule{ def ivyDeps = Agg( ivy"commons-io:commons-io:2.5" ) - def depClasspath = Agg( + def unmanagedClasspath = Agg( mill.modules.Util.download( "https://github.com/williamfiset/FastJavaIO/releases/download/v1.0/fastjavaio.jar", "fastjavaio.jar" -- cgit v1.2.3