fix: dev import can't import

All CLI imports were failing with "Maximum call stack size exceeded".
This commit is contained in:
Gabriel Horner
2025-10-22 10:37:23 -04:00
parent da185db4ad
commit 2500fe888a

View File

@@ -12,7 +12,6 @@
[datascript.core :as d]
[logseq.common.config :as common-config]
[logseq.common.graph :as common-graph]
[logseq.db :as ldb]
[logseq.db.common.sqlite-cli :as sqlite-cli]
[logseq.db.frontend.asset :as db-asset]
[logseq.graph-parser.exporter :as gp-exporter]
@@ -23,7 +22,8 @@
[promesa.core :as p]))
(def tx-queue (atom cljs.core/PersistentQueue.EMPTY))
(def original-transact! ldb/transact!)
;; This is a lower-level dev hook to inspect txs and shouldn't hook into ldb/transact!
(def original-transact! d/transact!)
(defn dev-transact! [conn tx-data tx-meta]
(swap! tx-queue (fn [queue]
(let [new-queue (conj queue {:tx-data tx-data :tx-meta tx-meta})]