mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
fix alias error incorrectly reported
This commit is contained in:
parent
1ef0d82c5c
commit
a08485b0ee
2 changed files with 27 additions and 18 deletions
|
@ -117,6 +117,11 @@ pub fn build_file<'a>(
|
|||
report_timing(buf, "Generate LLVM IR", code_gen_timing.code_gen);
|
||||
report_timing(buf, "Emit .o file", code_gen_timing.emit_o_file);
|
||||
|
||||
let compilation_end = compilation_start.elapsed().unwrap();
|
||||
|
||||
let size = std::fs::metadata(&app_o_file).unwrap().len();
|
||||
|
||||
if emit_debug_info {
|
||||
println!(
|
||||
"\n\nCompilation finished! Here's how long each module took to compile:\n\n{}",
|
||||
buf
|
||||
|
@ -124,15 +129,12 @@ pub fn build_file<'a>(
|
|||
|
||||
println!("\nSuccess! 🎉\n\n\t➡ {}\n", app_o_file.display());
|
||||
|
||||
let compilation_end = compilation_start.elapsed().unwrap();
|
||||
|
||||
let size = std::fs::metadata(&app_o_file).unwrap().len();
|
||||
|
||||
println!(
|
||||
"Finished compilation and code gen in {} ms\n\nProduced a app.o file of size {:?}\n",
|
||||
compilation_end.as_millis(),
|
||||
size,
|
||||
);
|
||||
}
|
||||
|
||||
// Step 2: link the precompiled host and compiled app
|
||||
let mut host_input_path = PathBuf::from(cwd);
|
||||
|
@ -144,10 +146,13 @@ pub fn build_file<'a>(
|
|||
let rebuild_host_start = SystemTime::now();
|
||||
rebuild_host(host_input_path.as_path());
|
||||
let rebuild_host_end = rebuild_host_start.elapsed().unwrap();
|
||||
|
||||
if emit_debug_info {
|
||||
println!(
|
||||
"Finished rebuilding the host in {} ms\n",
|
||||
rebuild_host_end.as_millis()
|
||||
);
|
||||
}
|
||||
|
||||
// TODO try to move as much of this linking as possible to the precompiled
|
||||
// host, to minimize the amount of host-application linking required.
|
||||
|
@ -168,7 +173,9 @@ pub fn build_file<'a>(
|
|||
});
|
||||
|
||||
let link_end = link_start.elapsed().unwrap();
|
||||
if emit_debug_info {
|
||||
println!("Finished linking in {} ms\n", link_end.as_millis());
|
||||
}
|
||||
|
||||
// Clean up the leftover .o file from the Roc, if possible.
|
||||
// (If cleaning it up fails, that's fine. No need to take action.)
|
||||
|
|
|
@ -190,7 +190,9 @@ fn unify_alias(
|
|||
problems.extend(unify_pool(subs, pool, *l_var, *r_var));
|
||||
}
|
||||
|
||||
if problems.is_empty() {
|
||||
problems.extend(merge(subs, &ctx, other_content.clone()));
|
||||
}
|
||||
|
||||
if problems.is_empty() {
|
||||
problems.extend(unify_pool(subs, pool, real_var, *other_real_var));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue