From 289bcc136dd9f11fef7fb225060a2fcba937c2ad Mon Sep 17 00:00:00 2001 From: Jordan Eizenga Date: Wed, 14 Dec 2022 14:14:25 -0800 Subject: [PATCH] fix recipe generalization application step --- src/index_registry.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/index_registry.cpp b/src/index_registry.cpp index e613dfc5cd8..07243b0174a 100644 --- a/src/index_registry.cpp +++ b/src/index_registry.cpp @@ -4942,8 +4942,15 @@ IndexingPlan IndexRegistry::make_plan(const IndexGroup& end_products) const { return dep_order_of_identifier[a.first] < dep_order_of_identifier[b.first]; }); +#ifdef debug_index_registry + cerr << "plan before applying generalizations:" << endl; + for (auto plan_elem : plan.steps) { + cerr << "\t" << to_string(plan_elem.first) << " " << plan_elem.second << endl; + } +#endif + // remove generalizees if we used their generalizers - set plan_set(plan.steps.begin(), plan.steps.begin()); + set plan_set(plan.steps.begin(), plan.steps.end()); plan.steps.resize(remove_if(plan.steps.begin(), plan.steps.end(), [&](const RecipeName& recipe) { return generalizations.count(recipe) && plan_set.count(generalizations.at(recipe)); }) - plan.steps.begin());