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 return Either (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 and stm-conduit are worth making use of
From https://github.com/avh4/elm-format/pull/770#issuecomment-1230725117, 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:
World
action for validating a file should returnEither (Loggable info) ()
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)TBMQueue
) to the main threadconduit
andstm-conduit
are worth making use of