[webkit-changes] [WebKit/WebKit] 6b6b7b: [filter-build-webkit] Show target names in colored...

Elliott Williams noreply at github.com
Fri Apr 28 10:50:12 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6b6b7bfe34b811d66d93415323a1346176e70caa
      https://github.com/WebKit/WebKit/commit/6b6b7bfe34b811d66d93415323a1346176e70caa
  Author: Elliott Williams <emw at apple.com>
  Date:   2023-04-28 (Fri, 28 Apr 2023)

  Changed paths:
    M Tools/Scripts/filter-build-webkit

  Log Message:
  -----------
  [filter-build-webkit] Show target names in colored output
https://bugs.webkit.org/show_bug.cgi?id=256052

Reviewed by Alexey Proskuryakov.

It's helpful to see which target each line from filter-build-webkit
corresponds with, to see at a glance how far the build has
progressed. When filter-build-webkit is connected to a terminal, prefix
the target name using ANSI colors onto each output line.

The target string is colored based on a checksum of the target name and
project name. This makes the output lines visually distinguishable
(e.g., JavaScriptCore is always the same color), and helps keep the task
description readable.

We only use ANSI "basic" colors (the first 16, excluding black and
white). These colors are set by the user's terminal theme, so it's
unlikely that the script will pick a color that is unreadable.

When output is not colorized (i.e. when being read by scripts or run in
CI), the target name is omitted, to preserve readability of the existing
task description.

* Tools/Scripts/filter-build-webkit:
(main):
(printLine):

Canonical link: https://commits.webkit.org/263505@main




More information about the webkit-changes mailing list