mesonbuild/meson

`meson setup` output ignores `b_colorout`

Open

#13.708 geöffnet am 23. Sept. 2024

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Python (1.465 Forks)batch import
enhancementgood first issue

Repository-Metriken

Stars
 (4.978 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 30T 19h) (63 gemergte PRs in 30 T)

Beschreibung

Describe the bug

meson setup -Db_colorout=always does not cause meson setup to produce color output when stdout is not a TTY. It appears that the logging code does not check the flag:

https://github.com/mesonbuild/meson/blob/dbad301c8b039c4469f8727924baf250421d64ac/mesonbuild/mlog.py#L395-L398

To Reproduce

$ cat > meson.build <<EOF
project('c', 'c')
summary('test', true, bool_yn: true)
EOF
$ meson setup build -Db_colorout=always | cat

Expected behavior

The meson setup log includes bold and green text.

system parameters

  • Is this a cross build or just a plain native build (for the same computer)? Native
  • what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.) Fedora 40
  • what Python version are you using e.g. 3.8.0 3.12.5
  • what meson --version 1.5.2
  • what ninja --version if it's a Ninja build n/a

Contributor Guide