From 4fe93fb31b20925c93f12f4a182dc57155fab5b6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 15 Jun 2022 12:59:58 +0200 Subject: Rename up_negotiate_configuration() to negotiate_configuration() --- bpkg/package-configuration.cxx | 2 +- bpkg/package-configuration.hxx | 4 ++-- bpkg/package-skeleton.cxx | 2 +- bpkg/pkg-build.cxx | 20 +++++++++++++++----- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/bpkg/package-configuration.cxx b/bpkg/package-configuration.cxx index 8298893..3c4fd44 100644 --- a/bpkg/package-configuration.cxx +++ b/bpkg/package-configuration.cxx @@ -112,7 +112,7 @@ namespace bpkg } bool - up_negotiate_configuration ( + negotiate_configuration ( package_configurations& cfgs, package_skeleton& dept, pair pos, diff --git a/bpkg/package-configuration.hxx b/bpkg/package-configuration.hxx index 3ff7b59..afc3dba 100644 --- a/bpkg/package-configuration.hxx +++ b/bpkg/package-configuration.hxx @@ -184,11 +184,11 @@ namespace bpkg small_vector change_history_; }; - // Up-negotiate the configuration for the specified dependencies of the + // Negotiate the configuration for the specified dependencies of the // specified dependent. Return true if the configuration has changed. // bool - up_negotiate_configuration ( + negotiate_configuration ( package_configurations&, package_skeleton& dependent, pair position, diff --git a/bpkg/package-skeleton.cxx b/bpkg/package-skeleton.cxx index c98d48d..e6a0be9 100644 --- a/bpkg/package-skeleton.cxx +++ b/bpkg/package-skeleton.cxx @@ -1433,7 +1433,7 @@ namespace bpkg // to true and may not have any conditions on other configuration // variables (including their origin). As a result, we don't need to set // the default (or other dependent) values, but will need the type - // information as well as overrides (see up_negotiate_configuration() + // information as well as overrides (see negotiate_configuration() // for details). // strings dvps; diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx index fa97cad..df58951 100644 --- a/bpkg/pkg-build.cxx +++ b/bpkg/pkg-build.cxx @@ -4323,6 +4323,11 @@ namespace bpkg // If this dependent has any dependencies with configurations // clauses, then we need to deal with that. // + // This is what we refer to as the "up-negotiation" where we + // negotiate the configuration of dependents that could not be + // postponed and handled all at once during "initial negotiation" in + // collect_build_postponed(). + // if (!cfg_deps.empty ()) { // Re-evaluation is a special case (it happens during cluster @@ -4521,9 +4526,9 @@ namespace bpkg // then we can no longer call reload_defaults() or // verify_sensible() on its skeleton. We could reset it, but // then we wouldn't be able to continue using it if - // up_negotiate_configuration() below returns false. So it - // seems the most sensible approach is to make a temporary - // copy and reset that. + // negotiate_configuration() below returns false. So it seems + // the most sensible approach is to make a temporary copy and + // reset that. // small_vector, 1> depcs; forward_list depcs_storage; // Ref stability. @@ -4552,7 +4557,7 @@ namespace bpkg } } - changed = up_negotiate_configuration ( + changed = negotiate_configuration ( cfg.dependency_configurations, *dept, dp, depcs); } @@ -5435,6 +5440,11 @@ namespace bpkg if (pcfg != nullptr) { + // This is what we refer to as the "initial negotiation" where we + // negotiate the configuration of dependents that could be postponed. + // Those that could not we "up-negotiate" in the collect() lambda of + // collect_build_prerequisites(). + // using packages = postponed_configuration::packages; assert (!pcfg->negotiated); @@ -5877,7 +5887,7 @@ namespace bpkg } } - if (up_negotiate_configuration ( + if (negotiate_configuration ( pcfg->dependency_configurations, *dept, pos, depcs)) { if (i != b) -- cgit v1.1