sbt in --client
mode loses stdout/stderr of the forked processes in continuous (watch) task mode after the task ir reevaluated
#7527
Labels
It seems that
sbt --client
has a problem losing stdout/stderr when a task is re-evaluated in the watch mode.This is somewhat obscure, as the task has to launch a process in the background using the
Fork
API. It was originally noticed insbt-revolver
plugin (spray/sbt-revolver#99). After quick investigation it seems thatsbt-revolver
does not do anything fancy, except launching the forked process (https://github.com/spray/sbt-revolver/blob/4d28f091d3f2ce2f7f28b0165bac6705effded9a/src/main/scala/spray/revolver/Actions.scala#L139).Reproduction case: https://github.com/arturaz/sbt-watch-loses-stdout
Expected behaviour
If we launch
sbt
in non-client mode everything works as expected:Notice that "Hello, World!" is printed every time
sbt-revolver
restarts the background process.Problem
However, if we launch it with
sbt --client
, this behaviour breaks down.Only the first run prints "Hello, World!", while the subsequent runs do not have any stdout/stderr output anymore.
Expectation
sbt
andsbt --client
should act identically.Notes
I would be interested in fixing this issue if more guidance would be provided.
This might also be related: #6866
The text was updated successfully, but these errors were encountered: