From abccaf9596461215fce0e32322133fb6c39be44f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 10 Feb 2017 08:15:48 +0200 Subject: Implement parallel error propagation, keep_going mode Keep going is the default but there is now the -s|--serial-stop that makes the driver run serially and stop at first error. Also fix some lockups, other minor improvements/features. --- build2/context.cxx | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) (limited to 'build2/context.cxx') diff --git a/build2/context.cxx b/build2/context.cxx index 400f68c..0357eb6 100644 --- a/build2/context.cxx +++ b/build2/context.cxx @@ -56,6 +56,8 @@ namespace build2 execution_mode current_mode; + bool keep_going = false; + atomic_count dependency_count; variable_override_cache var_override_cache; @@ -461,6 +463,35 @@ namespace build2 } void + diag_did (ostream& os, const action&, const target& t) + { + const meta_operation_info& m (*current_mif); + const operation_info& io (*current_inner_oif); + const operation_info* oo (current_outer_oif); + + // perform(update(x)) -> "updated x" + // configure(update(x)) -> "configured updating x" + // + if (!m.name_did.empty ()) + { + os << m.name_did << ' '; + + if (!io.name_doing.empty ()) + os << io.name_doing << ' '; + } + else + { + if (!io.name_did.empty ()) + os << io.name_did << ' '; + } + + if (oo != nullptr) + os << "(for " << oo->name << ") "; + + os << t; + } + + void diag_done (ostream& os, const action&, const target& t) { const meta_operation_info& m (*current_mif); @@ -475,10 +506,10 @@ namespace build2 os << t; if (!io.name_done.empty ()) - os << " " << io.name_done; + os << ' ' << io.name_done; if (oo != nullptr) - os << "(for " << oo->name << ") "; + os << " (for " << oo->name << ')'; } else { @@ -488,7 +519,7 @@ namespace build2 if (oo != nullptr) os << "(for " << oo->name << ") "; - os << t << " " << m.name_done; + os << t << ' ' << m.name_done; } } } -- cgit v1.1