Skip to content

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

@jyn514

Description

@jyn514

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions