Skip to content

Commit

Permalink
Remove logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jun 24, 2024
1 parent 5a32678 commit 72301e3
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions crates/turbopack-ecmascript/src/tree_shake/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,23 +502,6 @@ pub(super) async fn split(
.cell());
}

let mut buf = vec![];

{
let wr = JsWriter::new(Default::default(), "\n", &mut buf, None);

let mut emitter = Emitter {
cfg: Default::default(),
comments: None,
cm: source_map.clone(),
wr,
};

emitter.emit_program(program).unwrap();
}
let code = String::from_utf8(buf).unwrap();
eprintln!("# Program:\n{code}");

let module = match program {
Program::Module(module) => module,
Program::Script(..) => unreachable!("CJS is already handled"),
Expand All @@ -542,24 +525,6 @@ pub(super) async fn split(

assert_ne!(modules.len(), 0, "modules.len() == 0;\nModule: {module:?}",);

for (i, m) in modules.iter().enumerate() {
let mut buf = vec![];
{
let wr = JsWriter::new(Default::default(), "\n", &mut buf, None);

let mut emitter = Emitter {
cfg: Default::default(),
comments: None,
cm: source_map.clone(),
wr,
};

emitter.emit_module(m).unwrap();
}
let code = String::from_utf8(buf).unwrap();
eprintln!("# Module {i}:\n{code}");
}

for &v in entrypoints.values() {
debug_assert!(
v < modules.len() as u32,
Expand Down

0 comments on commit 72301e3

Please sign in to comment.