Open
Description
From #770 (comment), this is a low-priority issue to try using a cleaner design for coherent logging now that we process files in parallel.
The user-visible goal of this is to restore the pre-0.8.6 feature of elm-format --validate
streaming the log output as it progresses, instead of the 0.8.6 behavior of waiting until all files are processed before printing the log.
To capture my incomplete thoughts on this:
- the
World
action for validating a file should returnEither (Loggable info) ()
- the
mapMConcurrently
will need to be orchestrated from a new thread so that the main thread can listen for results and to the logging (and manage the state of the streaming JSON output) - the Eithers should be sent via an stm queue (preferably a bounded queue, most likely
TBMQueue
) to the main thread - probably
conduit
andstm-conduit
are worth making use of