Skip to content

Commit

Permalink
send command once instead of twice
Browse files Browse the repository at this point in the history
  • Loading branch information
CrescentonC committed Dec 3, 2024
1 parent d1a1817 commit 8d2749b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 3 additions & 2 deletions hkmc2/jvm/src/test/scala/hkmc2/JSBackendDiffMaker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ abstract class JSBackendDiffMaker extends MLsDiffMaker:


if traceJS.isSet then
host.execute("globalThis.Predef.TraceLogger.enabled = true")
host.execute("globalThis.Predef.TraceLogger.resetIndent(0)")
host.execute(
"globalThis.Predef.TraceLogger.enabled = true; " +
"globalThis.Predef.TraceLogger.resetIndent(0)")

mkQuery("", jsStr)

Expand Down
5 changes: 1 addition & 4 deletions hkmc2/shared/src/test/mlscript/codegen/TraceLogIndent.mls
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ f(1,2)(3)
:showRepl
:traceJS
f(1,2)(-3)
//│ REPL> Sending: globalThis.Predef.TraceLogger.enabled = true
//│ REPL> Collected:
//│ > true
//│ REPL> Sending: globalThis.Predef.TraceLogger.resetIndent(0)
//│ REPL> Sending: globalThis.Predef.TraceLogger.enabled = true; globalThis.Predef.TraceLogger.resetIndent(0)
//│ REPL> Collected:
//│ > undefined
//│ REPL> Sending: try { let tmp, tmp1; tmp = this.f(1, 2) ?? null; tmp1 = - 3; tmp(tmp1) ?? null } catch (e) { console.log('\u200B' + e.stack + '\u200B'); }
Expand Down

0 comments on commit 8d2749b

Please sign in to comment.