From 6c5feb88ef2174120a647d213f4e469c2c6ea093 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 13 May 2022 10:02:44 +0200 Subject: Review --- bpkg/pkg-build.cxx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx index e7a50f2..ab73ee3 100644 --- a/bpkg/pkg-build.cxx +++ b/bpkg/pkg-build.cxx @@ -1194,6 +1194,12 @@ namespace bpkg struct postponed_configuration { + // The id of the cluster plus the ids of all the clusters that have been + // merged into it. + // + size_t id; + small_vector merged_ids; + using packages = small_vector; class dependency: public packages @@ -1896,6 +1902,9 @@ namespace bpkg for (auto i (begin ()); i != end (); ++i, ++r) ; return r; } + + private: + size_t next_id_ = 1; }; static ostream& @@ -4850,7 +4859,7 @@ namespace bpkg // @@ Re-evaluate up-to the cluster's dependencies. - // @@ TMP + // @@ TMP: need proper implementation. // { b->dependencies = dependencies (); @@ -5005,9 +5014,7 @@ namespace bpkg assert (i != pcfg->dependents.end () && i->second.dependencies.size () == 1); - const pair& dp ( - i->second.dependencies[0].position); - + pair dp (i->second.dependencies[0].position); assert (dp.first == sdeps.size () + 1); build_package::dependency_alternatives_refs pdas ( @@ -5249,9 +5256,11 @@ namespace bpkg pc->set_shadow_cluster (move (shadow)); - // Force-merge into this cluster those non-negotiated clusters + // Pre-merge into this cluster those non-negotiated clusters // which are subsets of the shadow cluster. // + // @@ TODO: use cluster ids instead. + // for (postponed_configuration& c: postponed_cfgs) { if (&c != pc && -- cgit v1.1