Adds optional output during zinc compilation.

Review Request #2233 - Created May 15, 2015 and submitted

Information
James Mouradian
pants
twitter/pants/jmouradi/add_zinc_output
1560
7f472a2...
Reviewers
pants-reviews
jsirois, patricklaw, zundel

Allows a user to use one or more of three flags to produce optional output in zinc:
-log-phases: log the compilation phases of each file.
-print-progress: print the progress in perentage of steps complete to screen while compiling.
-heartbeat <interval in seconds>: emit a heartbeat every <interval> seconds.

Pull request: https://github.com/pantsbuild/pants/pull/1560

Sample output (available without line wrap at pull request):
From flag -log-phases:

18:02:48 00:01         [compile]
18:02:48 00:01           [bootstrap-zinc]
18:02:50 00:03           [zinc]
                         [info] Compiling 12 Scala sources to /Users/jmouradian/workspace/pants/.pants.d/compile/jvm/scala/classes...
                         [info] parser /Users/jmouradian/workspace/pants/src/scala/org/pantsbuild/zinc/Cache.scala...
                         [info] parser /Users/jmouradian/workspace/pants/src/scala/org/pantsbuild/zinc/Compiler.scala...
                         [info] parser /Users/jmouradian/workspace/pants/src/scala/org/pantsbuild/zinc/FileFPrint.scala...
                         [info] parser /Users/jmouradian/workspace/pants/src/scala/org/pantsbuild/zinc/Inputs.scala...
                         [info] parser /Users/jmouradian/workspace/pants/src/scala/org/pantsbuild/zinc/Main.scala...
                         [info] parser /Users/jmouradian/workspace/pants/src/scala/org/pantsbuild/zinc/Nailgun.scala...
                         [info] parser /Users/jmouradian/workspace/pants/src/scala/org/pantsbuild/zinc/Options.scala...
                         [info] parser /Users/jmouradian/workspace/pants/src/scala/org/pantsbuild/zinc/SbtAnalysis.scala...
                         [info] parser /Users/jmouradian/workspace/pants/src/scala/org/pantsbuild/zinc/Settings.scala...
                         [info] parser /Users/jmouradian/workspace/pants/src/scala/org/pantsbuild/zinc/Setup.scala...
                         [info] parser /Users/jmouradian/workspace/pants/src/scala/org/pantsbuild/zinc/Util.scala...
                         [info] parser /Users/jmouradian/workspace/pants/src/scala/org/pantsbuild/zinc/ZincClient.scala...
                         [info] namer /Users/jmouradian/workspace/pants/src/scala/org/pantsbuild/zinc/Cache.scala...
                         [info] namer /Users/jmouradian/workspace/pants/src/scala/org/pantsbuild/zinc/Compiler.scala...
                         [info] namer /Users/jmouradian/workspace/pants/src/scala/org/pantsbuild/zinc/FileFPrint.scala...
                         [info] namer /Users/jmouradian/workspace/pants/src/scala/org/pantsbuild/zinc/Inputs.scala...

From flag -print-progress:

18:04:58 00:01         [compile]
18:04:58 00:01           [zinc]
                         [info] Compiling 12 Scala sources to /Users/jmouradian/workspace/pants/.pants.d/compile/jvm/scala/classes...
                         Progress: 100%[info] Compile success at May 26, 2015 6:05:17 PM [18.715s]
                         Done.

From flag -heartbeat 1:

                     Compiling 12 scala sources in 1 target (partition 1 of 1).
18:06:17 00:01         [compile]
18:06:17 00:01           [bootstrap-scalac]
18:06:18 00:02           [bootstrap-zinc]
18:06:19 00:03           [zinc]
                         [info] Compiling 12 Scala sources to /Users/jmouradian/workspace/pants/.pants.d/compile/jvm/scala/classes...
                         ...............[info] Compile success at May 26, 2015 6:06:38 PM [18.765s]
                         Done.

Ran arbitrary targets in source observing output and ensuring SUCCESS.

Issues

  • 0
  • 8
  • 1
  • 9
Description From Last Updated
Andy Reitz
James Mouradian
Tejal Desai
James Mouradian
Andy Reitz
Eric Ayers
Benjy Weinberger
James Mouradian
Fedor Korotkov
James Mouradian
Fedor Korotkov
Fedor Korotkov
Nick Howard (Twitter)
Fedor Korotkov
James Mouradian
Eric Ayers
James Mouradian
Review request changed

Status: Closed (submitted)

John Sirois

   
Its not a big deal here, but always prefer nanoTime for monotonic intervals.
Loading...