Skip to content

Color handling: let's pass -colors instead of setting an env var #2339

@emillon

Description

@emillon

Hi,

dune is able to interpret and strip ANSI escape codes. Thanks to that we don't have to let tools determine what they're connected to (and because of buffering, it might return the wrong answers).

So we're setting OCAML_COLORS=always, but this has a drawback: it's inherited everywhere. If something that we call down the way calls ocamlc, it will have colors, but its output might be somewhere that does not expect color codes.

It seems to be easier to reason about flags if we only pass -color always to the executables dune call directly.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliCommand line relatedfeature-requestUser wanted features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions