summaryrefslogtreecommitdiff
path: root/main/test
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2018-12-12 22:15:38 +0800
committerGitHub <noreply@github.com>2018-12-12 22:15:38 +0800
commitea7fceb6e56f53bde3517586dfc57e10a605a524 (patch)
treecf2e4b7a403f8bcbcf3d1c4c45a8abd315cbefe6 /main/test
parentd0e1b572e88d311e1aee23d92e0384a81de4bcb6 (diff)
downloadmill-ea7fceb6e56f53bde3517586dfc57e10a605a524.tar.gz
mill-ea7fceb6e56f53bde3517586dfc57e10a605a524.tar.bz2
mill-ea7fceb6e56f53bde3517586dfc57e10a605a524.zip
First pass at splitting out worker-api from mill core. (#504)
This reduces the {scala,scalajs,scalanative}-worker dependency from the entirety of Mill to a much narrower `mill.api` module. This reduces the amount of classpath pollution within these workers, should mean they're much faster to download the first time, and reduces the amount of random junk they would pull in if they were to be used outside of the Mill project. The interactions between the various *Modules and their *WorkerImpls has been narrowed down to the `*.api` modules, which only depend on other `*.api` modules. A lot of things have been moved around; user code is unlikely to break, but it's possible some will if it references classes that have been moved around. Forwarders have been left for the few internal classes that Mill uses in it's own `build.sc`, to support bootstrapping. Third-party code which breaks should be a straightforward to fix just by updating imports The `*.api` modules have minimal dependencies (mostly uPickle and os-lib) and minimal code. There is still a bunch of implementation code in there: some of it defining data-types that are commonly sent across the module/worker interface (`Agg`, `PathRef`, ...), and some of it just general helper functions that are needed both in modules and workers. The latter code isn't strictly API definitions, but for now is small enough it's not worth splitting into it's own module
Diffstat (limited to 'main/test')
-rw-r--r--main/test/resources/examples/javac/build.sc2
-rw-r--r--main/test/src/mill/define/ApplicativeTests.scala2
-rw-r--r--main/test/src/mill/define/CacherTests.scala2
-rw-r--r--main/test/src/mill/eval/FailureTests.scala2
-rw-r--r--main/test/src/mill/eval/JavaCompileJarTests.scala2
-rw-r--r--main/test/src/mill/util/TestEvaluator.scala2
-rw-r--r--main/test/src/mill/util/TestUtil.scala4
7 files changed, 8 insertions, 8 deletions
diff --git a/main/test/resources/examples/javac/build.sc b/main/test/resources/examples/javac/build.sc
index c45a6e2d..2ed9f915 100644
--- a/main/test/resources/examples/javac/build.sc
+++ b/main/test/resources/examples/javac/build.sc
@@ -1,6 +1,6 @@
import mill.T
import mill.eval.JavaCompileJarTests.compileAll
-import mill.eval.PathRef
+import mill.api.PathRef
import mill.modules.Jvm
import mill.util.Loose
diff --git a/main/test/src/mill/define/ApplicativeTests.scala b/main/test/src/mill/define/ApplicativeTests.scala
index 72b715bb..9dd2132f 100644
--- a/main/test/src/mill/define/ApplicativeTests.scala
+++ b/main/test/src/mill/define/ApplicativeTests.scala
@@ -1,6 +1,6 @@
package mill.define
-import mill.define.Applicative.ImplicitStub
+import mill.api.Ctx.ImplicitStub
import utest._
import scala.annotation.compileTimeOnly
diff --git a/main/test/src/mill/define/CacherTests.scala b/main/test/src/mill/define/CacherTests.scala
index 84a8d840..59ebf3f6 100644
--- a/main/test/src/mill/define/CacherTests.scala
+++ b/main/test/src/mill/define/CacherTests.scala
@@ -3,7 +3,7 @@ package mill.define
import mill.util.{DummyLogger, TestEvaluator, TestUtil}
import mill.util.Strict.Agg
import mill.T
-import mill.eval.Result.Success
+import mill.api.Result.Success
import utest._
import utest.framework.TestPath
diff --git a/main/test/src/mill/eval/FailureTests.scala b/main/test/src/mill/eval/FailureTests.scala
index bf45119c..dcfbcb60 100644
--- a/main/test/src/mill/eval/FailureTests.scala
+++ b/main/test/src/mill/eval/FailureTests.scala
@@ -1,7 +1,7 @@
package mill.eval
import mill.T
import mill.util.{TestEvaluator, TestUtil}
-import mill.eval.Result.OuterStack
+import mill.api.Result.OuterStack
import utest._
import utest.framework.TestPath
diff --git a/main/test/src/mill/eval/JavaCompileJarTests.scala b/main/test/src/mill/eval/JavaCompileJarTests.scala
index 8e931747..426c6ea6 100644
--- a/main/test/src/mill/eval/JavaCompileJarTests.scala
+++ b/main/test/src/mill/eval/JavaCompileJarTests.scala
@@ -2,7 +2,7 @@ package mill.eval
import mill.define.{Discover, Input, Target, Task}
import mill.modules.Jvm
-import mill.util.Ctx.Dest
+import mill.api.Ctx.Dest
import mill.{Module, T}
import mill.util.{DummyLogger, Loose, TestEvaluator, TestUtil}
import mill.util.Strict.Agg
diff --git a/main/test/src/mill/util/TestEvaluator.scala b/main/test/src/mill/util/TestEvaluator.scala
index 67ba96dc..9a235679 100644
--- a/main/test/src/mill/util/TestEvaluator.scala
+++ b/main/test/src/mill/util/TestEvaluator.scala
@@ -1,7 +1,7 @@
package mill.util
import mill.define.{Input, Target, Task}
-import mill.eval.Result.OuterStack
+import mill.api.Result.OuterStack
import mill.eval.{Evaluator, Result}
import mill.util.Strict.Agg
import utest.assert
diff --git a/main/test/src/mill/util/TestUtil.scala b/main/test/src/mill/util/TestUtil.scala
index e5fe906e..baab2992 100644
--- a/main/test/src/mill/util/TestUtil.scala
+++ b/main/test/src/mill/util/TestUtil.scala
@@ -2,8 +2,8 @@ package mill.util
import mill.util.Router.Overrides
import mill.define._
-import mill.eval.Result
-import mill.eval.Result.OuterStack
+import mill.api.Result
+import mill.api.Result.OuterStack
import utest.assert
import mill.util.Strict.Agg
import utest.framework.TestPath