From 605be45b4d674b7a6f318f2c765dc69d605a69d5 Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Fri, 25 May 2018 10:12:22 -0700 Subject: Add a `visualize` command to render portions of the build graph as SVG (#349) * Transitive reduction of visualized graph via jgrapht now works ``` out/dev/launcher/dest/run -i visualize __.compile _ out/dev/launcher/dest/run -i visualize core.__ ``` * Move test running logic from scalaworker into scalalib This is to try and reduce the size of the classpath we are passing to the test runner subprocess, in an attempt to fix the command-line-too-long errors we're getting in Appveyor. Now the test runner subprocess should no longer need Zinc or all of it's transitive dependencies * - Break out `GraphvizTools` into a separate Mill module, to avoid bloating the main jar and try to shorten the `MILL_SCALA_WORKER` classpath being sent to scalajslib.test (which is blowing up on windows as the CLI command is too long) - Move the meat of `resolveDependencies` from `scalalib` to `main`, to support resolving mill modules - DRY up resolution of mill modules in `Util.millProjectModule` * fix mill module resolution * Tweaks to try and make zinc work again... * Tweak `Module#reflect` to try and make it happy with `visualize` module... * fix integration test classpath * move visualization into it's own module --- scratch/build.sc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'scratch/build.sc') diff --git a/scratch/build.sc b/scratch/build.sc index 9842039e..db446c99 100644 --- a/scratch/build.sc +++ b/scratch/build.sc @@ -1,4 +1,15 @@ -def thingy = T { - val blob = (('0' to '9') ++ ('a' to 'z') ++ ('A' to 'Z')).mkString - while(true) print(blob) +import mill.Agg +import mill.scalalib._ + +trait JUnitTests extends TestModule{ + def testFrameworks = Seq("com.novocode.junit.JUnitFramework") + def ivyDeps = Agg(ivy"com.novocode:junit-interface:0.11") +} + +object core extends JavaModule{ + object test extends Tests with JUnitTests +} +object app extends JavaModule{ + def moduleDeps = Seq(core) + object test extends Tests with JUnitTests } \ No newline at end of file -- cgit v1.2.3