aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-05-24 11:04:50 +0200
committerKaren Arutyunov <karen@codesynthesis.com>2022-06-07 21:15:37 +0300
commit208bf45f25304a8b9b9bdca6244120a0c02d759d (patch)
tree264d077bc9879bb6df32c75592672744e4c5c0c0
parent5f813283c8760f664a725a2fdd77d7a7a0b21f54 (diff)
Postponed positions sketch
-rw-r--r--bpkg/pkg-build.cxx39
1 files changed, 32 insertions, 7 deletions
diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx
index e450985..b752ba3 100644
--- a/bpkg/pkg-build.cxx
+++ b/bpkg/pkg-build.cxx
@@ -2751,21 +2751,34 @@ namespace bpkg
{
// @@ Here we need to first check if for this dependent there is a
// record in the postponed_poss (not yet invented; any better
- // name?) map. If the record exists and the dependency position
+ // name?) map.
+
+ // (If the record exists and the dependency position
// is greater that the stored position, then we skip this
// dependent. Otherwise, we need to check if this existing
// dependent is already present in some non-negotiated
// cluster. If it doesn't then just create the cluster and bail
- // out. Otherwise, if the dependency position is greater than
- // that one in the cluster for this dependent, then skip this
- // dependent. Otherwise, if the position is less, then note
- // this position in this map and start from scratch. Otherwise
- // (the position is equal), just add the dependency to the
- // existing cluster.
+ // out. Otherwise, if the position is less, then note this
+ // position in this map and start from scratch. Otherwise (the
+ // position is equal), just add the dependency to the existing
+ // cluster.) -- Feels outdated.
//
// Note that we also need to think if any such entries could
// become bogus (and if we believe not, then assert so).
//
+ // new ? exs exs
+ // ------------------
+ //
+ // less neg -- postponed_poss & throw
+ // less non -- insert
+ //
+ // greater neg -- insert
+ // greater non -- insert
+ //
+ // equal neg -- impossible (should have been completed)
+ // equal non -- add missing dependencies
+ //
+ //
l5 ([&]{trace << "cfg-postpone dependency "
<< pkg.available_name_version_db ()
<< " of existing dependent " << *ed.selected
@@ -5243,6 +5256,18 @@ namespace bpkg
if (ed.reevaluated)
continue;
+ // @@ Check if exists in a cluster with earlier position and
+ // throw skip_configuration exception. Perhaps only if not
+ // already negotiated?
+ //
+ // @@ If already negotiated at later position -- throw
+ // postpone_position?
+ //
+ // @@ What if it is in postponed_poss map? Yes, also, if
+ // earlier position is in the postponed_poss, then skip
+ // this cluster.
+ //
+
const config_package& cp (d.first);
packages& ds (ed.dependencies);