mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-24 20:42:29 +00:00
Do not mark whether a module has specialization deps incrementally
Whether a module has a dependency on another module for specialization is already accounted for when the build graph was initially populated, and should not be modified again. Closes #4622
This commit is contained in:
parent
2a27d3c05f
commit
1ab41bf6b5
2 changed files with 9 additions and 3 deletions
|
@ -3003,7 +3003,10 @@ fn update<'a>(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
log!("re-launching specializations pass");
|
log!(
|
||||||
|
"re-launching make-specializations: pass {}",
|
||||||
|
state.make_specializations_pass.current_pass() + 1
|
||||||
|
);
|
||||||
|
|
||||||
state.make_specializations_pass.inc();
|
state.make_specializations_pass.inc();
|
||||||
|
|
||||||
|
|
|
@ -454,6 +454,8 @@ impl<'a> Dependencies<'a> {
|
||||||
pub fn load_find_and_make_specializations_after_check(&mut self) -> MutSet<(ModuleId, Phase)> {
|
pub fn load_find_and_make_specializations_after_check(&mut self) -> MutSet<(ModuleId, Phase)> {
|
||||||
let mut output = MutSet::default();
|
let mut output = MutSet::default();
|
||||||
|
|
||||||
|
// Take out the specialization dependency graph, as this should not be modified as we
|
||||||
|
// reload the build graph. We'll make sure the state is unaffected at the end of this call.
|
||||||
let mut make_specializations_dependents = MakeSpecializationsDependents::default();
|
let mut make_specializations_dependents = MakeSpecializationsDependents::default();
|
||||||
let default_make_specializations_dependents_len = make_specializations_dependents.0.len();
|
let default_make_specializations_dependents_len = make_specializations_dependents.0.len();
|
||||||
std::mem::swap(
|
std::mem::swap(
|
||||||
|
@ -484,8 +486,9 @@ impl<'a> Dependencies<'a> {
|
||||||
self.add_dependency(module_dep, module, Phase::MakeSpecializations);
|
self.add_dependency(module_dep, module, Phase::MakeSpecializations);
|
||||||
self.add_dependency(ModuleId::DERIVED_GEN, module, Phase::MakeSpecializations);
|
self.add_dependency(ModuleId::DERIVED_GEN, module, Phase::MakeSpecializations);
|
||||||
|
|
||||||
// `module_dep` can't make its specializations until the current module does.
|
// That `module_dep` can't make its specializations until the current module does
|
||||||
info.has_pred = true;
|
// should already be accounted for in `make_specializations_dependents`, which we
|
||||||
|
// populated when initially building the graph.
|
||||||
}
|
}
|
||||||
|
|
||||||
if module != ModuleId::DERIVED_GEN {
|
if module != ModuleId::DERIVED_GEN {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue