From 75cedf46dba58e94b55678dc64bd4f77e23de5cd Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 22 Feb 2024 10:30:21 +0200 Subject: Diagnose instead of asserting lib{} group with no members Fixes GH issue #361. --- libbuild2/bin/utility.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libbuild2/bin/utility.cxx b/libbuild2/bin/utility.cxx index 2a87bbd..a03ea50 100644 --- a/libbuild2/bin/utility.cxx +++ b/libbuild2/bin/utility.cxx @@ -89,7 +89,9 @@ namespace build2 // Make sure group members are resolved. // group_view gv (resolve_members (a, l)); - assert (gv.members != nullptr); + + if (gv.members == nullptr) + fail << "group " << l << " has no members"; pair p ( link_member (lmembers {l.a != nullptr, l.s != nullptr}, li.order)); -- cgit v1.1