MozillaBuild 4.0.2 is a bugfix patch that allows us to enable a long overdue feature: colors!
This release enables colored console output from Mach within our Windows development environment, bringing it into alignment with Linux and macOS.
A few notes:
On Windows the Footer may flicker slightly, depending on your setup. If this bothers you, you can disable it by setting MACH_NO_TERMINAL_FOOTER=1 in your environment.
The Footer is a line of text describing the current stage of the build pinned to the bottom of the console.
Eg: “TIER: configure pre-export export compile misc libs tools”
If you were perfectly happy without colors and don’t want anything to change you can disable all colors by setting NO_ANSI=1 in your environment (this also disables the Footer).
The MozillaBuild installer now sets a single registry value: HKCU\Console\VirtualTerminalLevel=1. This enables ANSI Escape Sequences (colors and more) interpretation in all Windows terminals. It is not enabled by default on Windows for legacy backwards compatibility reasons. If you work on legacy stuff outside of MozillaBuild there’s a small chance you might encounter some weird issue with this value set. If you do encounter this problem, you can delete the registry value, but you will also have to set NO_ANSI=1 to avoid seeing tons of unescaped ANSI Escape Sequences from the Mach output.
If you encounter any unescaped ANSI Escape Sequences, please let us know by filing a bug. Here’s a few examples of what they can look like:
Essentially, if you ever see “←[“ or “←(“ something is probably not quite right.