diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-05-04 13:54:34 +0200 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2022-05-06 12:57:16 +0300 |
commit | 70ccce6e7ae8554b15ff3028c9d214814186d666 (patch) | |
tree | 9d7c66639bf7f28e9eaf3465ee2361b1f7649024 | |
parent | 865f3955fc0dbfd9c03bb67b9e9e2855086e4f0a (diff) |
Take 2 sketch
-rw-r--r-- | bpkg/pkg-build.cxx | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx index 11d5af3..9c8cca5 100644 --- a/bpkg/pkg-build.cxx +++ b/bpkg/pkg-build.cxx @@ -3653,6 +3653,9 @@ namespace bpkg // dep_chain.clear (); + // @@ Only throw this if dependency is collected but no + // cluster (from-scratch). + // throw postpone_dependency (move (dcp)); } else @@ -4730,6 +4733,7 @@ namespace bpkg postponed_configuration c (cfg); + for (;;) // Either return or retry the same cluster. try { collect_build_postponed (o, @@ -4756,8 +4760,14 @@ namespace bpkg return; } - catch (const postpone_dependency& e) + // @@ Note: we still need to keep postpone_dependency for the + // from-scratch case. + // + catch (const postpone_dependency& e) // @@ retry_configuration { + // @@ TODO: use depth of the outermost merged cluster (that + // is being/has been negotiated). + // // If this is not "our problem", then keep looking. // if (!c.contains_dependency (e.package)) @@ -4774,7 +4784,17 @@ namespace bpkg postponed_deps, postponed_cfgs); - continue; // Try next. + // @@ TODO: we need to somehow record the dependent/dependencies + // that triggered this (included in the exception, presumably) + // so that we don't repeat this up-negotiate/throw/catch dance. + // Note clear if we should just add it to the cluster (we could + // do it with proper depends position, etc) or somewhere on the + // side. We will also need to have a corresponding check in the + // throw side when we re-visit. + // + // But there is also a possibility of having a bogus + // dependent/dependencies (i.e., we add them to the cluster + // but they never get re-visited). } } |