mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Add some more logging to file.rs
This commit is contained in:
parent
bee24fcd37
commit
26f77ecffd
1 changed files with 32 additions and 0 deletions
|
@ -1162,6 +1162,7 @@ enum BuildTask<'a> {
|
|||
},
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
enum WorkerMsg {
|
||||
Shutdown,
|
||||
TaskAdded,
|
||||
|
@ -2118,6 +2119,31 @@ fn worker_task<'a>(
|
|||
// added. In that case, do nothing, and keep waiting
|
||||
// until we receive a Shutdown message.
|
||||
if let Some(task) = find_task(&worker, injector, stealers) {
|
||||
log!(
|
||||
">>> {}",
|
||||
match &task {
|
||||
BuildTask::LoadModule { module_name, .. } => {
|
||||
format!("BuildTask::LoadModule({:?})", module_name)
|
||||
}
|
||||
BuildTask::Parse { header } => {
|
||||
format!("BuildTask::Parse({})", header.module_path.display())
|
||||
}
|
||||
BuildTask::CanonicalizeAndConstrain { parsed, .. } => format!(
|
||||
"BuildTask::CanonicalizeAndConstrain({})",
|
||||
parsed.module_path.display()
|
||||
),
|
||||
BuildTask::Solve { module, .. } => {
|
||||
format!("BuildTask::Solve({:?})", module.module_id)
|
||||
}
|
||||
BuildTask::BuildPendingSpecializations { module_id, .. } => {
|
||||
format!("BuildTask::BuildPendingSpecializations({:?})", module_id)
|
||||
}
|
||||
BuildTask::MakeSpecializations { module_id, .. } => {
|
||||
format!("BuildTask::MakeSpecializations({:?})", module_id)
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
let result = run_task(
|
||||
task,
|
||||
worker_arena,
|
||||
|
@ -2330,6 +2356,12 @@ fn update<'a>(
|
|||
}
|
||||
};
|
||||
|
||||
log!(
|
||||
"New package shorthand: {:?} => {:?}",
|
||||
shorthand,
|
||||
shorthand_path
|
||||
);
|
||||
|
||||
shorthands.insert(shorthand, shorthand_path);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue