Closed Bug 905481 Opened 11 years ago Closed 3 years ago

|mach build| should make error messages easier to spot

Categories

(Firefox Build System :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: n.nethercote, Unassigned)

Details

(Whiteboard: [mach])

Finding the errors among all the other spew in a browser build can be difficult.  I have a |mach build| wrapper that ends with this code:

    echo
    echo "======================================="
    echo "errors"
    echo "======================================="
    echo
    # Show up to five errors, with 10 lines of trailing context each.  But
    # first, truncate line length to 300 chars (because I sometimes get
    # extremely long lines describing the command line used, which are
    # annoying).
    perl -p -e 's/^(.{300}).*$/\1/' $objdir/log | \
        grep --max-count=5 --before-context=3 --after-context=10 "\<error:"

The idea is that it plucks out the first five compile errors, each with a bit of context.  It would be nice if |mach build| did this for me.
Summary: |mach build| should → |mach build| should make error messages easier to spot
> It would be nice if |mach build| did this for me.

Make that "absolutely delightful", actually.
Component: mach → Build Config
Whiteboard: [mach]
Something relevant:  glandium mentioned the mach statusbar today and I had absolutely no idea what he was talking about.  Turns out you don't see it if you redirect mach's output...
(In reply to Nicholas Nethercote [:njn] from comment #2)
> Something relevant:  glandium mentioned the mach statusbar today and I had
> absolutely no idea what he was talking about.  Turns out you don't see it if
> you redirect mach's output...

The status bar is only rendered if isatty(stdout) because it sends terminal escaping sequences that you probably don't want printed to a file/pipe. There is currently no way to override this, although we could probably offer one.
> The status bar is only rendered if isatty(stdout)

Which is perfectly reasonable.  My point, which I should have made clearer, is that if mach nicely pulled out the error messages, people might not have to redirect its output for their own ad hoc post-processing, and then they would see the status bar :)

(I would still redirect, though, because I need the output in a file to use vim's quickfix mode.  Hmm, if |mach build| could do the redirection itself, I could get the statusbar and the redirection I need...)
Also note this is going to be made increasingly important as we make the build system more parallel. Because it's harder to find error in parallel builds.
Product: Core → Firefox Build System
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.