haskell / haskell/cabal

notice and friends generate interleaved output when used concurrently

Open
#5,756 2 comments 0 reactions 0 assignees View on GitHub
Cabal: other type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

[`notice`](https://www.haskell.org/cabal/release/latest/doc/API/Cabal/Distribution-Simple-Utils.html#v:notice) and similar functions generate interleaved output when used concurrently.

This is due to the use of `hPutStrLn`.

It makes writing Cabal hooks that do things in parallel a pain.

It also makes `strace`ing cabal very annoying because it pollutes the outuput.

As a solution, we should use something like `say`, that prints the entire contents in one go and ensures no interleaved output.

Contributor guide

Open the contributing guide

Research direction

Start by locating the Cabal implementation of notice and the similar output functions, then inspect where they use hPutStrLn. Compare that behavior with the mentioned say approach and verify concurrent output, including the strace-related output concern, is no longer interleaved.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.