On Thu, 4 Jul 2013 02:10:02 -0700 (PDT)There is not a built-in progress indicator. There is a CompileProgress interface, but it is not exposed:
Rogach <platon...@gmail.com> wrote:
> I have a project, that usually compiles for 30-60 seconds. It would be
> really nice if there was some way to print a message to sbt console when
> one of compiler phases finishes (so to provide some progress indication).
>
> Is there some built-in way to do this?
https://github.com/sbt/sbt/blob/0.13/interface/src/main/java/xsbti/compile/CompileProgress.java
https://github.com/sbt/sbt/blob/0.13/compile/integration/src/main/scala/sbt/compiler/AggressiveCompile.scala#L23
There isn't a general mechanism in sbt for providing a progress indicator in a concurrent build environment. The "Resolving ..." messages can overwrite previous ones because only one 'update' is allowed to run at a time. I'm not sure how it would work for multiple compiles running at the same time.
On Jul 5, 2013 7:50 PM, "Grzegorz Kossakowski" <grzegorz.k...@gmail.com> wrote:
>
> On 4 July 2013 16:03, Mark Harrah <dmha...@gmail.com> wrote:
>>
>> On Thu, 4 Jul 2013 02:10:02 -0700 (PDT)
>> Rogach <platon...@gmail.com> wrote:
>>
>> > I have a project, that usually compiles for 30-60 seconds. It would be
>> > really nice if there was some way to print a message to sbt console when
>> > one of compiler phases finishes (so to provide some progress indication).
>> >
>> > Is there some built-in way to do this?
>>
>> There is not a built-in progress indicator. There is a CompileProgress interface, but it is not exposed:
>>
>> https://github.com/sbt/sbt/blob/0.13/interface/src/main/java/xsbti/compile/CompileProgress.java
>>
>> https://github.com/sbt/sbt/blob/0.13/compile/integration/src/main/scala/sbt/compiler/AggressiveCompile.scala#L23
>>
>> There isn't a general mechanism in sbt for providing a progress indicator in a concurrent build environment. The "Resolving ..." messages can overwrite previous ones because only one 'update' is allowed to run at a time. I'm not sure how it would work for multiple compiles running at the same time.
>
>
> What about the idea that each concurrent process gets separate buffer of fixed number of lines assigned (a box, almost like a window) to it and then sbt would concatenate them one after another?
>
+1
> This way each process could log at their pace and user would get a nice overview if number of processes is not too large (e.g. up to 8) which is exactly the case when people compile projects.
>
> --
> Grzegorz Kossakowski
> Scalac hacker at Typesafe
> twitter: @gkossakowski
> github: @gkossakowski
>