Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use stm-conduit for logging #788

Open
avh4 opened this issue Feb 11, 2023 · 0 comments
Open

Use stm-conduit for logging #788

avh4 opened this issue Feb 11, 2023 · 0 comments

Comments

@avh4
Copy link
Owner

avh4 commented Feb 11, 2023

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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant