Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add trace log for module executor #6451

Merged
merged 1 commit into from
May 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions crates/rspack_core/src/compiler/module_executor/ctrl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ impl UnfinishCounter {
}

// send event can only use in sync task
#[derive(Debug)]
pub enum Event {
StartBuild(ModuleIdentifier),
// origin_module_identifier and current dependency id and target_module_identifier
Expand Down Expand Up @@ -84,6 +85,7 @@ impl Task<MakeTaskContext> for CtrlTask {

async fn async_run(mut self: Box<Self>) -> TaskResult<MakeTaskContext> {
while let Some(event) = self.event_receiver.recv().await {
tracing::info!("CtrlTask async receive {:?}", event);
match event {
Event::StartBuild(module_identifier) => {
self
Expand Down Expand Up @@ -176,6 +178,7 @@ impl Task<MakeTaskContext> for FinishModuleTask {
// clean ctrl task events
loop {
let event = ctrl_task.event_receiver.try_recv();
tracing::info!("CtrlTask sync receive {:?}", event);
let Ok(event) = event else {
if matches!(event, Err(TryRecvError::Empty)) {
break;
Expand Down Expand Up @@ -246,6 +249,7 @@ impl Task<MakeTaskContext> for FinishModuleTask {
}

while let Some(module_identifier) = queue.pop_front() {
tracing::info!("finish build module {:?}", module_identifier);
ctrl_task.running_module_map.remove(&module_identifier);

let mgm = module_graph
Expand Down
Loading