mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
remove unused module checking from Solve step
This commit is contained in:
parent
496c283491
commit
fe72008845
1 changed files with 0 additions and 17 deletions
|
@ -501,7 +501,6 @@ enum Msg<'a> {
|
||||||
decls: Vec<Declaration>,
|
decls: Vec<Declaration>,
|
||||||
dep_idents: MutMap<ModuleId, IdentIds>,
|
dep_idents: MutMap<ModuleId, IdentIds>,
|
||||||
module_timing: ModuleTiming,
|
module_timing: ModuleTiming,
|
||||||
unused_imports: MutMap<ModuleId, Region>,
|
|
||||||
},
|
},
|
||||||
FinishedAllTypeChecking {
|
FinishedAllTypeChecking {
|
||||||
solved_subs: Solved<Subs>,
|
solved_subs: Solved<Subs>,
|
||||||
|
@ -736,7 +735,6 @@ enum BuildTask<'a> {
|
||||||
var_store: VarStore,
|
var_store: VarStore,
|
||||||
declarations: Vec<Declaration>,
|
declarations: Vec<Declaration>,
|
||||||
dep_idents: MutMap<ModuleId, IdentIds>,
|
dep_idents: MutMap<ModuleId, IdentIds>,
|
||||||
unused_imported_modules: MutMap<ModuleId, Region>,
|
|
||||||
},
|
},
|
||||||
BuildPendingSpecializations {
|
BuildPendingSpecializations {
|
||||||
module_timing: ModuleTiming,
|
module_timing: ModuleTiming,
|
||||||
|
@ -1778,7 +1776,6 @@ fn update<'a>(
|
||||||
decls,
|
decls,
|
||||||
dep_idents,
|
dep_idents,
|
||||||
mut module_timing,
|
mut module_timing,
|
||||||
mut unused_imports,
|
|
||||||
} => {
|
} => {
|
||||||
log!("solved types for {:?}", module_id);
|
log!("solved types for {:?}", module_id);
|
||||||
module_timing.end_time = SystemTime::now();
|
module_timing.end_time = SystemTime::now();
|
||||||
|
@ -1788,15 +1785,6 @@ fn update<'a>(
|
||||||
.type_problems
|
.type_problems
|
||||||
.insert(module_id, solved_module.problems);
|
.insert(module_id, solved_module.problems);
|
||||||
|
|
||||||
let existing = match state.module_cache.can_problems.entry(module_id) {
|
|
||||||
Vacant(entry) => entry.insert(std::vec::Vec::new()),
|
|
||||||
Occupied(entry) => entry.into_mut(),
|
|
||||||
};
|
|
||||||
|
|
||||||
for (unused, region) in unused_imports.drain() {
|
|
||||||
existing.push(roc_problem::can::Problem::UnusedImport(unused, region));
|
|
||||||
}
|
|
||||||
|
|
||||||
let work = state.dependencies.notify(module_id, Phase::SolveTypes);
|
let work = state.dependencies.notify(module_id, Phase::SolveTypes);
|
||||||
|
|
||||||
// if there is a platform, the Package-Config module provides host-exposed,
|
// if there is a platform, the Package-Config module provides host-exposed,
|
||||||
|
@ -3095,7 +3083,6 @@ impl<'a> BuildTask<'a> {
|
||||||
declarations,
|
declarations,
|
||||||
dep_idents,
|
dep_idents,
|
||||||
module_timing,
|
module_timing,
|
||||||
unused_imported_modules,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3111,7 +3098,6 @@ fn run_solve<'a>(
|
||||||
mut var_store: VarStore,
|
mut var_store: VarStore,
|
||||||
decls: Vec<Declaration>,
|
decls: Vec<Declaration>,
|
||||||
dep_idents: MutMap<ModuleId, IdentIds>,
|
dep_idents: MutMap<ModuleId, IdentIds>,
|
||||||
unused_imports: MutMap<ModuleId, Region>,
|
|
||||||
) -> Msg<'a> {
|
) -> Msg<'a> {
|
||||||
// We have more constraining work to do now, so we'll add it to our timings.
|
// We have more constraining work to do now, so we'll add it to our timings.
|
||||||
let constrain_start = SystemTime::now();
|
let constrain_start = SystemTime::now();
|
||||||
|
@ -3173,7 +3159,6 @@ fn run_solve<'a>(
|
||||||
dep_idents,
|
dep_idents,
|
||||||
solved_module,
|
solved_module,
|
||||||
module_timing,
|
module_timing,
|
||||||
unused_imports,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3793,7 +3778,6 @@ fn run_task<'a>(
|
||||||
ident_ids,
|
ident_ids,
|
||||||
declarations,
|
declarations,
|
||||||
dep_idents,
|
dep_idents,
|
||||||
unused_imported_modules,
|
|
||||||
} => Ok(run_solve(
|
} => Ok(run_solve(
|
||||||
module,
|
module,
|
||||||
ident_ids,
|
ident_ids,
|
||||||
|
@ -3804,7 +3788,6 @@ fn run_task<'a>(
|
||||||
var_store,
|
var_store,
|
||||||
declarations,
|
declarations,
|
||||||
dep_idents,
|
dep_idents,
|
||||||
unused_imported_modules,
|
|
||||||
)),
|
)),
|
||||||
BuildPendingSpecializations {
|
BuildPendingSpecializations {
|
||||||
module_id,
|
module_id,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue