ocaml / ocaml/dune

Redirecting dune output / "non-interactive use" should respect POLA

Open
#3,930 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

acknowledged
Dominant language
OCaml
Stars
1.9k
Forks
500
Avg merge
15h 21m
Merged PRs (30d)
277

Description

Desired Behavior

When running dune commands and redirecting the output, in accordance with the "principle of least astonishment", dune should respect that. Currently the output seems to be going to stderr, with colours, etc.

As a bonus, if run with output connected to something that is not a terminal, perhaps automatically enable --verbose; obviously a series of Done: XXX/YYY lines is not going to be terribly useful to anyone.

Example

$ dune build --verbose | grep foo
(produces the appropriate result)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing dune build --verbose | grep foo and compare output sent to a terminal versus a pipe. Trace the dune command handling for terminal detection and output streams; done means redirected output follows the expected stream and formatting behavior, with the non-terminal verbosity bonus addressed or explicitly scoped.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
build-system, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.