diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-06-15 12:59:58 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-06-15 12:59:58 +0200 |
commit | 4fe93fb31b20925c93f12f4a182dc57155fab5b6 (patch) | |
tree | 8a80b2e93043fa4f848b3ad57e7050e2addc4679 | |
parent | 43212495490c1431f2cf31291d0af571fdc8777d (diff) |
Rename up_negotiate_configuration() to negotiate_configuration()
-rw-r--r-- | bpkg/package-configuration.cxx | 2 | ||||
-rw-r--r-- | bpkg/package-configuration.hxx | 4 | ||||
-rw-r--r-- | bpkg/package-skeleton.cxx | 2 | ||||
-rw-r--r-- | 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<size_t, size_t> 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<dependent_config_variable_values, 2> 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<size_t, size_t> 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<reference_wrapper<package_skeleton>, 1> depcs; forward_list<package_skeleton> 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) |