diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2017-11-26 19:32:09 +0100 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2017-11-26 10:32:09 -0800 |
commit | 1c1abf19b34bc6a467c25b8838f7816694d423d1 (patch) | |
tree | c12e467f1848cbb7f41bdb139e1de60dff7cad65 /scalaplugin | |
parent | 5cd797e25682ea3ac8d02c75b06c905c5b2fb103 (diff) | |
download | mill-1c1abf19b34bc6a467c25b8838f7816694d423d1.tar.gz mill-1c1abf19b34bc6a467c25b8838f7816694d423d1.tar.bz2 mill-1c1abf19b34bc6a467c25b8838f7816694d423d1.zip |
Cleaner logging of Zinc activities. (#25)
* Bust caches when the build itself has changed.
Use the Ammonite classloader to check if the classpath has changed
Fix #7
* Cleaner logging of Zinc activities.
Removed printlns and bumped up the Zinc log level to Info. This show the nice `Compiling <n> Scala sources` messages, and the useless `Done compiling` line at the end.
Diffstat (limited to 'scalaplugin')
-rw-r--r-- | scalaplugin/src/main/scala/mill/scalaplugin/ScalaModule.scala | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/scalaplugin/src/main/scala/mill/scalaplugin/ScalaModule.scala b/scalaplugin/src/main/scala/mill/scalaplugin/ScalaModule.scala index b454d793..f42a3055 100644 --- a/scalaplugin/src/main/scala/mill/scalaplugin/ScalaModule.scala +++ b/scalaplugin/src/main/scala/mill/scalaplugin/ScalaModule.scala @@ -64,7 +64,7 @@ object ScalaModule{ val consoleAppender = MainAppender.defaultScreen(console) val l = LogExchange.logger("Hello") LogExchange.unbindLoggerAppenders("Hello") - LogExchange.bindLoggerAppenders("Hello", (consoleAppender -> sbt.util.Level.Warn) :: Nil) + LogExchange.bindLoggerAppenders("Hello", (consoleAppender -> sbt.util.Level.Info) :: Nil) l } val compiler = new IncrementalCompilerImpl @@ -77,18 +77,11 @@ object ScalaModule{ val extra = Array(InterfaceUtil.t2(("key", "value"))) var lastCompiledUnits: Set[String] = Set.empty - val progress = new CompileProgress { + val ignoreProgress = new CompileProgress { override def advance(current: Int, total: Int): Boolean = true - - override def startUnit(phase: String, unitPath: String): Unit = { - println(unitPath) - lastCompiledUnits += unitPath - } + override def startUnit(phase: String, unitPath: String): Unit = () } - println("Running Compile") - println(outputPath/'zinc) - println(exists(outputPath/'zinc)) val zincFile = (outputPath/'zinc).toIO val store = FileAnalysisStore.binary(zincFile) val classesDir = (outputPath / 'classes).toIO @@ -110,12 +103,11 @@ object ScalaModule{ compilerCache, IncOptions.of(), reporter, - Some(progress), + Some(ignoreProgress), extra ), pr = { val prev = store.get() - println(prev) PreviousResult.of(prev.map(_.getAnalysis), prev.map(_.getMiniSetup)) } ), |