From 5b84b34eb1c4c49607a0d14706b15a6923f1ab0c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 26 Aug 2021 11:40:35 +0200 Subject: Print diagnostics about empty configurations after "in configuration ...:" In particular, this makes sure they are separated with blank lines. --- bdep/sync.cxx | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'bdep/sync.cxx') diff --git a/bdep/sync.cxx b/bdep/sync.cxx index 3ab3ab4..e4e302b 100644 --- a/bdep/sync.cxx +++ b/bdep/sync.cxx @@ -1516,24 +1516,16 @@ namespace bdep continue; } - // Skipping empty ones. + // Skipping empty ones (part one). // // Note that we would normally be printing that for build-time // dependency configurations (which normally will not have any - // initialized packages) and that would be annying. So we suppress it in - // case of the default configuration fallback (but also check and warn - // if all of them were empty below). + // initialized packages) and that would be annoying. So we suppress it + // in case of the default configuration fallback (but also check and + // warn if all of them were empty below). // - if (c != nullptr && c->packages.empty ()) - { - if (verb && !default_fallback) - info << "skipping configuration " << *c << - info << "configuration is empty"; - + if (c != nullptr && c->packages.empty () && default_fallback) continue; - } - - empty = false; // If we are synchronizing multiple configurations, separate them with a // blank line and print the configuration name/directory. @@ -1542,6 +1534,19 @@ namespace bdep text << (i == 0 ? "" : "\n") << "in configuration " << *c << ':'; + // Skipping empty ones (part two). + // + if (c != nullptr && c->packages.empty ()) + { + if (verb) + info << "no packages initialized in configuration " << *c + << ", skipping"; + + continue; + } + + empty = false; + bool fetch (o.fetch () || o.fetch_full ()); if (fetch) -- cgit v1.1