mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
Fix gen-dev tests
This commit is contained in:
parent
afe49cf570
commit
38fd9e8286
1 changed files with 2 additions and 14 deletions
|
@ -107,15 +107,12 @@ pub fn helper(
|
||||||
let mut delayed_errors = Vec::new();
|
let mut delayed_errors = Vec::new();
|
||||||
|
|
||||||
for (home, (module_path, src)) in loaded.sources {
|
for (home, (module_path, src)) in loaded.sources {
|
||||||
use roc_reporting::report::{
|
use roc_reporting::report::{can_problem, type_problem, RocDocAllocator, DEFAULT_PALETTE};
|
||||||
can_problem, mono_problem, type_problem, RocDocAllocator, DEFAULT_PALETTE,
|
|
||||||
};
|
|
||||||
|
|
||||||
let can_problems = loaded.can_problems.remove(&home).unwrap_or_default();
|
let can_problems = loaded.can_problems.remove(&home).unwrap_or_default();
|
||||||
let type_problems = loaded.type_problems.remove(&home).unwrap_or_default();
|
let type_problems = loaded.type_problems.remove(&home).unwrap_or_default();
|
||||||
let mono_problems = loaded.mono_problems.remove(&home).unwrap_or_default();
|
|
||||||
|
|
||||||
let error_count = can_problems.len() + type_problems.len() + mono_problems.len();
|
let error_count = can_problems.len() + type_problems.len();
|
||||||
|
|
||||||
if error_count == 0 {
|
if error_count == 0 {
|
||||||
continue;
|
continue;
|
||||||
|
@ -156,15 +153,6 @@ pub fn helper(
|
||||||
lines.push(buf);
|
lines.push(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for problem in mono_problems {
|
|
||||||
let report = mono_problem(&alloc, &line_info, module_path.clone(), problem);
|
|
||||||
let mut buf = String::new();
|
|
||||||
|
|
||||||
report.render_color_terminal(&mut buf, &alloc, &palette);
|
|
||||||
|
|
||||||
lines.push(buf);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if !lines.is_empty() {
|
if !lines.is_empty() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue