I wrote a small filter script that lists all build errors once again at the bottom of the whole build log, so that you don't have to look for them like for a needle in a haystack. Something I wanted mach
to do natively. But I was always told something like "filter yourself". So here it is :)
- Download this small script *)
- Copy it to your source directory or somewhere your $PATH points to
- run mach as:
./mach build | err
When there are errors during build, those will be listed under the build log and conveniently highlighted.
*) It's tuned for and mainly targeting mingw, but might well work on linux/osx too.
On Linux/OSX, the compiler already does coloring (except when mach prevents it from doing so)
Yep, although, my small filter script is more about listing the errors at the bottom in a compact view, so that one doesn't have to search for them very inconveniently somewhere in the large build log output. Highlighting is just a nice side product of it. The post may use some update. Thanks for the feedback.
I have something that is very similar in concept, though of course totally different in execution :) Details at https://lists.mozilla.org/pipermail/dev-platform/2015-January/008270.html
I remain surprised that "roll your own" is the official advice here. There are mach commands for getting the warnings from a build, which is rarely useful, while getting the errors from a build is something you do literally every time a build fails.
Yes, I was surprised as well. We have a good filtering for warnings, but apparently from some reason I don't fully understand we cannot do the same for errors.