Skip to content

Commit c0fe06a

Browse files
committed
Store states data as JSON in debugger
1 parent 98c1459 commit c0fe06a

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

rust/cubesql/cubesql/egraph-debug-template/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { states } from './states';
1+
import states from './states.json';
22
import { createRoot } from 'react-dom/client';
33
import ELK from 'elkjs/lib/elk.bundled.js';
44
import React, { useCallback, useState, useEffect, useMemo } from 'react';

rust/cubesql/cubesql/src/compile/rewrite/rewriter.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,8 @@ fn write_debug_states(
261261
last_debug_data = Some(debug_data_clone);
262262
}
263263
fs::write(
264-
format!("{}/src/states.js", dir),
265-
&format!(
266-
"export const states = {};",
267-
serde_json::to_string_pretty(&states)?
268-
),
264+
format!("{}/src/states.json", dir),
265+
serde_json::to_string_pretty(&states)?,
269266
)?;
270267

271268
Ok(())

0 commit comments

Comments
 (0)