capnproto/ekam

`-c`: Don't reprint all failed tasks when only a single task is rebuilt and fails

jyn514 opened this issue · 1 comments

Right now, when a C++ file fails to compile, Ekam will output something like this for each C++ file in the whole project:

✘ link: kj/debug-test.o
    ld.lld: error: undefined symbol: kj::_::Debug::Fault::fatal()
    >>> referenced by time.c++:303 (/ekam-provider/canonical/kj/time.c++:303)
    >>>               tmp/kj/time.o:(kj::operator*(kj::_::Stringifier, kj::Quantity<long, kj:
      :_::NanosecondLabel>))
    >>> referenced by time.c++:193 (/ekam-provider/canonical/kj/time.c++:193)
    >>>               tmp/kj/time.o:(kj::(anonymous namespace)::PosixClock::now() const)
    >>> referenced by time.c++:207 (/ekam-provider/canonical/kj/time.c++:207)
    >>>               tmp/kj/time.o:(kj::(anonymous namespace)::PosixMonotonicClock::now() 
      const)
    >>> referenced 70 more times
    
    ld.lld: error: undefined symbol: kj::_::Debug::Fault::~Fault()
    >>> referenced by time.c++:303 (/ekam-provider/canonical/kj/time.c++:303)
    >>>               tmp/kj/time.o:(kj::operator*(kj::_::Stringifier, kj::Quantity<long, kj:
      :_::NanosecondLabel>))
    >>> referenced by time.c++:193 (/ekam-provider/canonical/kj/time.c++:193)
    >>>               tmp/kj/time.o:(kj::(anonymous namespace)::PosixClock::now() const)
    >>> referenced by time.c++:207 (/ekam-provider/canonical/kj/time.c++:207)
    >>>               tmp/kj/time.o:(kj::(anonymous namespace)::PosixMonotonicClock::now() 
      const)
    >>> referenced 96 more times
    
    ld.lld: error: undefined symbol: kj::_::Debug::getOsErrorNumber(bool)
    >>> referenced by debug.h:544 (/ekam-provider/canonical/kj/debug.h:544)
    >>>               tmp/kj/time.o:(kj::_::Debug::SyscallResult kj::_::Debug::syscall<kj::(
      anonymous namespace)::PosixClock::now() const::'lambda'()>(kj::(anonymous namespace)::
      PosixClock::now() const::'lambda'()&&, bool))
    >>> referenced by debug.h:544 (/ekam-provider/canonical/kj/debug.h:544)
    >>>               tmp/kj/time.o:(kj::_::Debug::SyscallResult kj::_::Debug::syscall<kj::(
      anonymous namespace)::PosixMonotonicClock::now() const::'lambda'()>(kj::(anonymous 
    ...(log truncated; use -l to increase log limit)...

Then, if you change debug.c++ without fixing the error (e.g. you try a change that doesn't work), it will show the error from debug.c++, but it will also show red X's for each object file that failed to link, even though nothing's changed WRT to the object file since the last error.

✘ compile: kj/debug.c++
    /ekam-provider/canonical/kj/debug.c++:2:1: error: expected unqualified-id
✘ link: kj/common-test.o
✘ link: kj/memory-test.o
✘ compile: capnp/llvm-fuzzer-testcase.c++
✘ link: kj/encoding-test.o
✘ compile: capnp/schema-test.c++
✘ link: kj/async-xthread-test.o
...

It would be nice to only show the error for debug.c++, not all other files.

I think it would make sense to further de-emphasize the things that aren't new, and maybe move the new stuff to the end of the list so it's easier to find... but I do frequently find it useful to be able to see what else is still broken, like a little reminder of which tests I still need to fix.