[build2] No compiler output when {}-imbalance detected

Boris Kolpackov boris at codesynthesis.com
Wed Oct 16 14:26:13 UTC 2019

Markus Pawellek <markuspawellek at gmail.com> writes:

> if build2 detects a {}-imbalance, one only gets an error message from
> build2 itself and not from the compiler.
> But build2 gives us no clue where exactly an opening or closing brace
> is missing.
> The compiler error message is much more descriptive and tells us
> something about the position where the brace could have been
> forgotten.
> Is there a way to somehow show the actual output of the compiler in
> this scenario?

Yes, I was actually thinking about this the other day. This diagnostics
is issued by build2 (the C++ compile rule, to be precise) during module
dependency extraction and before the compiler is run.

We could run the compiler to get nice diagnostics but then we would need
to make sure any BMIs for modules that we have discovered so far (and
which the compiler will need) are up to date, which feels quite heavy-

I think the better approach is to improve the diagnostics that we issue;
there is no reason we cannot make it as good as what's produced by the
compilers. Let me see what I can do.

More information about the users mailing list