Răsfoiți Sursa

Move config fns and remaining util fns that mldoc depends on

Gabriel Horner 3 ani în urmă
părinte
comite
a58a411567

+ 2 - 1
.clj-kondo/config.edn

@@ -20,7 +20,8 @@
              frontend.db.query-react query-react
              frontend.util util
              frontend.config config
-             logseq.graph-parser.util gp-util}}}
+             logseq.graph-parser.util gp-util
+             logseq.graph-parser.config gp-config}}}
 
  :hooks {:analyze-call {rum.core/defc hooks.rum/defc
                          rum.core/defcs hooks.rum/defcs}}

+ 5 - 4
src/main/frontend/commands.cljs

@@ -16,6 +16,7 @@
             [frontend.util.priority :as priority]
             [frontend.util.property :as property]
             [logseq.graph-parser.util :as gp-util]
+            [logseq.graph-parser.config :as gp-config]
             [goog.dom :as gdom]
             [goog.object :as gobj]
             [promesa.core :as p]))
@@ -275,7 +276,7 @@
                     [:codemirror/focus]] "Insert a calculator"]
      ["Draw" (fn []
                (let [file (draw/file-name)
-                     path (str config/default-draw-directory "/" file)
+                     path (str gp-config/default-draw-directory "/" file)
                      text (util/format "[[%s]]" path)]
                  (p/let [_ (draw/create-draw-with-default-content path)]
                    (println "draw file created, " path))
@@ -334,13 +335,13 @@
           current-pos (cursor/pos input)
           current-pos (or
                        (when (and end-pattern (string? end-pattern))
-                         (when-let [i (string/index-of (util/safe-subs edit-content current-pos) end-pattern)]
+                         (when-let [i (string/index-of (gp-util/safe-subs edit-content current-pos) end-pattern)]
                            (+ current-pos i)))
                        current-pos)
           orig-prefix (subs edit-content 0 current-pos)
           space? (when (and last-pattern orig-prefix)
                    (let [s (when-let [last-index (string/last-index-of orig-prefix last-pattern)]
-                             (util/safe-subs orig-prefix 0 last-index))]
+                             (gp-util/safe-subs orig-prefix 0 last-index))]
                      (not
                       (or
                        (and s
@@ -353,7 +354,7 @@
                    space?)
           prefix (cond
                    (and backward-truncate-number (integer? backward-truncate-number))
-                   (str (util/safe-subs orig-prefix 0 (- (count orig-prefix) backward-truncate-number))
+                   (str (gp-util/safe-subs orig-prefix 0 (- (count orig-prefix) backward-truncate-number))
                         (when-not (zero? backward-truncate-number)
                           value))
 

+ 4 - 3
src/main/frontend/components/block.cljs

@@ -51,6 +51,7 @@
             [frontend.util.clock :as clock]
             [frontend.util.property :as property]
             [frontend.util.drawer :as drawer]
+            [logseq.graph-parser.config :as gp-config]
             [logseq.graph-parser.util :as gp-util]
             [goog.dom :as gdom]
             [goog.object :as gobj]
@@ -282,7 +283,7 @@
         title (second (first label))]
     (ui/catch-error
      [:span.warning full_text]
-     (if (and (config/local-asset? href)
+     (if (and (gp-config/local-asset? href)
               (config/local-db? (state/get-current-repo)))
        (asset-link config title href metadata full_text)
        (let [href (cond
@@ -764,7 +765,7 @@
        (and
         (nil? metadata-show)
         (or
-         (config/local-asset? s)
+         (gp-config/local-asset? s)
          (text/media-link? media-formats s)))
        (true? (boolean metadata-show))))
 
@@ -786,7 +787,7 @@
 
 (rum/defc audio-link
   [config url href _label metadata full_text]
-  (if (and (config/local-asset? href)
+  (if (and (gp-config/local-asset? href)
            (config/local-db? (state/get-current-repo)))
     (asset-link config nil href metadata full_text)
     (let [href (cond

+ 4 - 3
src/main/frontend/components/editor.cljs

@@ -23,6 +23,7 @@
             [frontend.util :as util]
             [frontend.util.cursor :as cursor]
             [frontend.util.keycode :as keycode]
+            [logseq.graph-parser.util :as gp-util]
             [goog.dom :as gdom]
             [promesa.core :as p]
             [rum.core :as rum]
@@ -112,9 +113,9 @@
               q (or
                  @editor-handler/*selected-text
                  (when (state/sub :editor/show-page-search-hashtag?)
-                   (util/safe-subs edit-content pos current-pos))
+                   (gp-util/safe-subs edit-content pos current-pos))
                  (when (> (count edit-content) current-pos)
-                   (util/safe-subs edit-content pos current-pos))
+                   (gp-util/safe-subs edit-content pos current-pos))
                  "")
               matched-pages (when-not (string/blank? q)
                               (editor-handler/get-matched-pages q))
@@ -619,7 +620,7 @@
                     config/mobile?)
                 (not (:review-cards? config)))
        (mobile-bar state id))
-     
+
      (ui/ls-textarea
       {:id                id
        :cacheMeasurements (editor-row-height-unchanged?) ;; check when content updated (as the content variable is binded)

+ 3 - 2
src/main/frontend/components/file.cljs

@@ -13,6 +13,7 @@
             [frontend.handler.export :as export-handler]
             [frontend.state :as state]
             [frontend.util :as util]
+            [logseq.graph-parser.config :as gp-config]
             [goog.object :as gobj]
             [reitit.frontend.easy :as rfe]
             [rum.core :as rum]))
@@ -43,8 +44,8 @@
            (let [file-id file]
              [:tr {:key file-id}
               [:td
-               (let [href (if (config/draw? file)
-                            (rfe/href :draw nil {:file (string/replace file (str config/default-draw-directory "/") "")})
+               (let [href (if (gp-config/draw? file)
+                            (rfe/href :draw nil {:file (string/replace file (str gp-config/default-draw-directory "/") "")})
                             (rfe/href :file {:path file-id}))]
                  [:a {:href href}
                   file])]

+ 0 - 10
src/main/frontend/config.cljs

@@ -255,7 +255,6 @@
 
 (defonce default-journals-directory "journals")
 (defonce default-pages-directory "pages")
-(defonce default-draw-directory "draws")
 
 (defn get-pages-directory
   []
@@ -265,10 +264,6 @@
   []
   (or (state/get-journals-directory) default-journals-directory))
 
-(defn draw?
-  [path]
-  (util/starts-with? path default-draw-directory))
-
 (defonce local-repo "local")
 
 (defn demo-graph?
@@ -277,7 +272,6 @@
   ([graph]
    (= graph local-repo)))
 
-(defonce local-assets-dir "assets")
 (defonce recycle-dir ".recycle")
 (def config-file "config.edn")
 (def custom-css-file "custom.css")
@@ -300,10 +294,6 @@
   (and (string? s)
        (string/starts-with? s local-db-prefix)))
 
-(defn local-asset?
-  [s]
-  (gp-util/safe-re-find (re-pattern (str "^[./]*" local-assets-dir)) s))
-
 (defn get-local-asset-absolute-path
   [s]
   (str "/" (string/replace s #"^[./]*" "")))

+ 2 - 1
src/main/frontend/diff.cljs

@@ -5,6 +5,7 @@
             [lambdaisland.glogi :as log]
             [cljs-bean.core :as bean]
             [frontend.util :as util]
+            [logseq.graph-parser.util :as gp-util]
             [frontend.text :as text]))
 
 (defn diff
@@ -54,7 +55,7 @@
           (+ pos 2)
 
           (contains? inline-special-chars (util/nth-safe markup pos))
-          (let [matched (->> (take-while inline-special-chars (util/safe-subs markup pos))
+          (let [matched (->> (take-while inline-special-chars (gp-util/safe-subs markup pos))
                              (apply str))
                 matched? (and current-line (string/includes? current-line (string/reverse matched)))]
             (if matched?

+ 8 - 7
src/main/frontend/extensions/pdf/assets.cljs

@@ -9,6 +9,7 @@
             [frontend.handler.page :as page-handler]
             [frontend.state :as state]
             [frontend.util :as util]
+            [logseq.graph-parser.config :as gp-config]
             [medley.core :as medley]
             [promesa.core :as p]
             [reitit.frontend.easy :as rfe]
@@ -35,8 +36,8 @@
 
               :else
               (let [full-path (string/replace full-path #"^[.\/\\]+" "")
-                    full-path (if-not (string/starts-with? full-path config/local-assets-dir)
-                                (util/node-path.join config/local-assets-dir full-path)
+                    full-path (if-not (string/starts-with? full-path gp-config/local-assets-dir)
+                                (util/node-path.join gp-config/local-assets-dir full-path)
                                 full-path)]
                 (str "file://"  ;; TODO: bfs
                      (util/node-path.join
@@ -75,7 +76,7 @@
 (defn resolve-hls-data-by-key$
   [target-key]
   ;; TODO: fuzzy match
-  (when-let [hls-file (and target-key (str config/local-assets-dir "/" target-key ".edn"))]
+  (when-let [hls-file (and target-key (str gp-config/local-assets-dir "/" target-key ".edn"))]
     (load-hls-data$ {:hls-file hls-file})))
 
 (defn area-highlight?
@@ -113,7 +114,7 @@
                                    fstamp (get-in new-hl [:content :image])
                                    old-fstamp (and old-hl (get-in old-hl [:content :image]))
                                    fname (str (:page new-hl) "_" (:id new-hl))
-                                   fdir (str config/local-assets-dir "/" key)
+                                   fdir (str gp-config/local-assets-dir "/" key)
                                    _ (fs/mkdir-if-not-exists (str repo-dir "/" fdir))
                                    new-fpath (str fdir "/" fname "_" fstamp ".png")
                                    old-fpath (and old-fstamp (str fdir "/" fname "_" old-fstamp ".png"))
@@ -142,7 +143,7 @@
           repo-dir (config/get-repo-dir repo-cur)
           fstamp (get-in hl [:content :image])
           fname (str (:page hl) "_" (:id hl))
-          fdir (str config/local-assets-dir "/" fkey)
+          fdir (str gp-config/local-assets-dir "/" fkey)
           fpath (util/node-path.join repo-dir (str fdir "/" fname "_" fstamp ".png"))]
 
       (fs/unlink! repo-cur fpath {}))))
@@ -156,7 +157,7 @@
         format (state/get-preferred-format)]
     (if-not page
       (let [repo-dir (config/get-repo-dir (state/get-current-repo))
-            asset-dir (util/node-path.join repo-dir config/local-assets-dir)
+            asset-dir (util/node-path.join repo-dir gp-config/local-assets-dir)
             url (if (string/includes? url asset-dir)
                   (str ".." (last (string/split url repo-dir)))
                   url)
@@ -245,7 +246,7 @@
       (when-let [group-key (string/replace-first (:block/original-name page) #"^hls__" "")]
         (when-let [hl-page (:hl-page props)]
           (let [asset-path (editor-handler/make-asset-url
-                             (str "/" config/local-assets-dir "/" group-key "/" (str hl-page "_" id "_" stamp ".png")))]
+                             (str "/" gp-config/local-assets-dir "/" group-key "/" (str hl-page "_" id "_" stamp ".png")))]
             [:span.hl-area
              [:img {:src asset-path}]]))))))
 

+ 4 - 0
src/main/frontend/external/roam.cljc

@@ -1,4 +1,6 @@
 (ns frontend.external.roam
+  ;; TODO: Convert this ns and upstream dependents to .cljs. .clj was only for tests
+  ;; and those tests have been removed
   (:require #?(:cljs [cljs-bean.core :as bean]
                :clj [cheshire.core :as json])
             ;; TODO: clj-kondo incorrectly thinks these requires are unused
@@ -40,6 +42,8 @@
 (defn macro-transform
   [text]
   (string/replace text macro-pattern (fn [[original text]]
+                                       ;; Disable clj warning since clj is unused
+                                       #_:clj-kondo/ignore
                                        (let [[name arg] (gp-util/split-first ":" text)]
                                          (if name
                                            ;; TODO: Why unresolved var

+ 4 - 3
src/main/frontend/format/block.cljs

@@ -12,6 +12,7 @@
             [frontend.util :as util]
             [frontend.util.property :as property]
             [logseq.graph-parser.util :as gp-util]
+            [logseq.graph-parser.config :as gp-config]
             [lambdaisland.glogi :as log]
             [medley.core :as medley]
             [frontend.format.mldoc :as mldoc]))
@@ -54,8 +55,8 @@
                   (and
                    (= typ "Page_ref")
                    (and (string? value)
-                        (not (or (config/local-asset? value)
-                                 (config/draw? value))))
+                        (not (or (gp-config/local-asset? value)
+                                 (gp-config/draw? value))))
                    value)
 
                   (and
@@ -70,7 +71,7 @@
                      (when (and (not (util/starts-with? value "http:"))
                                 (not (util/starts-with? value "https:"))
                                 (not (util/starts-with? value "file:"))
-                                (not (config/local-asset? value))
+                                (not (gp-config/local-asset? value))
                                 (or (= ext :excalidraw)
                                     (not (contains? (config/supported-formats) ext))))
                        value)))

+ 8 - 9
src/main/frontend/format/mldoc.cljs

@@ -3,14 +3,13 @@
             [clojure.string :as string]
             [frontend.format.protocol :as protocol]
             [frontend.utf8 :as utf8]
-            [frontend.util :as util]
             [goog.object :as gobj]
             [lambdaisland.glogi :as log]
             [medley.core :as medley]
             ["mldoc" :as mldoc :refer [Mldoc]]
             [linked.core :as linked]
             [logseq.graph-parser.util :as gp-util]
-            [frontend.config :as config]))
+            [logseq.graph-parser.config :as gp-config]))
 
 (defonce parseJson (gobj/get Mldoc "parseJson"))
 (defonce parseInlineJson (gobj/get Mldoc "parseInlineJson"))
@@ -93,8 +92,8 @@
   (let [lines (string/split-lines s)
         [f & r] lines
         body (map (fn [line]
-                    (if (string/blank? (util/safe-subs line 0 level))
-                      (util/safe-subs line level)
+                    (if (string/blank? (gp-util/safe-subs line 0 level))
+                      (gp-util/safe-subs line level)
                       line))
                (if remove-first-line? lines r))
         content (if remove-first-line? body (cons f body))]
@@ -203,7 +202,7 @@
         []
         (-> content
             (parse-json config)
-            (util/json->clj)
+            (gp-util/json->clj)
             (update-src-full-content content)
             (collect-page-properties parse-property)))
       (catch js/Error e
@@ -216,7 +215,7 @@
   (try
     (if (string/blank? content)
       {}
-      (let [[headers blocks] (-> content (parse-opml) (util/json->clj))]
+      (let [[headers blocks] (-> content (parse-opml) (gp-util/json->clj))]
         [headers (collect-page-properties blocks parse-property)]))
     (catch js/Error e
       (log/error :edn/convert-failed e)
@@ -229,7 +228,7 @@
       {}
       (-> text
           (inline-parse-json config)
-          (util/json->clj)))
+          (gp-util/json->clj)))
     (catch js/Error _e
       [])))
 
@@ -274,7 +273,7 @@
             (and (contains? #{"Page_ref"} ref-type)
                  (or
                   ;; 2. excalidraw link
-                  (config/draw? ref-value)
+                  (gp-config/draw? ref-value)
 
                   ;; 3. local asset link
-                  (boolean (config/local-asset? ref-value)))))))))
+                  (boolean (gp-config/local-asset? ref-value)))))))))

+ 3 - 2
src/main/frontend/handler/draw.cljs

@@ -7,6 +7,7 @@
             [frontend.handler.file :as file-handler]
             [frontend.state :as state]
             [frontend.util :as util]
+            [logseq.graph-parser.config :as gp-config]
             [promesa.core :as p]))
 
 (defn create-draws-directory!
@@ -14,7 +15,7 @@
   (when repo
     (let [repo-dir (config/get-repo-dir repo)]
       (util/p-handle
-       (fs/mkdir! (str repo-dir (str "/" config/default-draw-directory)))
+       (fs/mkdir! (str repo-dir (str "/" gp-config/default-draw-directory)))
        (fn [_result] nil)
        (fn [_error] nil)))))
 
@@ -61,6 +62,6 @@
   [current-file]
   (when-let [repo (state/get-current-repo)]
     (p/let [exists? (fs/file-exists? (config/get-repo-dir repo)
-                                     (str config/default-draw-directory current-file))]
+                                     (str gp-config/default-draw-directory current-file))]
       (when-not exists?
         (save-excalidraw! current-file default-content)))))

+ 3 - 3
src/main/frontend/handler/editor.cljs

@@ -1293,7 +1293,7 @@
                  elem (and input-id (gdom/getElement input-id))
                  db-content (:block/content db-block)
                  db-content-without-heading (and db-content
-                                                 (util/safe-subs db-content (:block/level db-block)))
+                                                 (gp-util/safe-subs db-content (:block/level db-block)))
                  value (and elem (gobj/get elem "value"))]
              (cond
                force?
@@ -1760,7 +1760,7 @@
             edit-content (or (state/sub [:editor/content id]) "")]
         (or
          @*selected-text
-         (util/safe-subs edit-content pos current-pos))))))
+         (gp-util/safe-subs edit-content pos current-pos))))))
 
 (defn close-autocomplete-if-outside
   [input]
@@ -1773,7 +1773,7 @@
       (let [value (gobj/get input "value")
             pos (state/get-editor-last-pos)
             current-pos (cursor/pos input)
-            between (util/safe-subs value (min pos current-pos) (max pos current-pos))]
+            between (gp-util/safe-subs value (min pos current-pos) (max pos current-pos))]
         (when (and between
                    (or
                     (string/includes? between "[")

+ 6 - 5
src/main/frontend/handler/page.cljs

@@ -34,6 +34,7 @@
             [promesa.core :as p]
             [frontend.mobile.util :as mobile-util]
             [logseq.graph-parser.util :as gp-util]
+            [logseq.graph-parser.config :as gp-config]
             [goog.functions :refer [debounce]]))
 
 (defn- get-directory
@@ -48,7 +49,7 @@
                  (date/journal-title->default title)
                  (util/page-name-sanity (string/lower-case title)))]
     ;; Win10 file path has a length limit of 260 chars
-    (util/safe-subs s 0 200)))
+    (gp-util/safe-subs s 0 200)))
 
 (defn get-page-file-path
   ([] (get-page-file-path (state/get-current-page)))
@@ -627,7 +628,7 @@
        (remove (fn [p]
                  (let [name (:block/name p)]
                    (or (gp-util/uuid-string? name)
-                       (config/draw? name)
+                       (gp-config/draw? name)
                        (db/built-in-pages-names (string/upper-case name))))))
        (common-handler/fix-pages-timestamps)))
 
@@ -670,13 +671,13 @@
         q (or
            @editor-handler/*selected-text
            (when (state/sub :editor/show-page-search-hashtag?)
-             (util/safe-subs edit-content pos current-pos))
+             (gp-util/safe-subs edit-content pos current-pos))
            (when (> (count edit-content) current-pos)
-             (util/safe-subs edit-content pos current-pos)))]
+             (gp-util/safe-subs edit-content pos current-pos)))]
     (if (state/sub :editor/show-page-search-hashtag?)
       (fn [chosen _click?]
         (state/set-editor-show-page-search! false)
-        (let [wrapped? (= "[[" (util/safe-subs edit-content (- pos 2) pos))
+        (let [wrapped? (= "[[" (gp-util/safe-subs edit-content (- pos 2) pos))
               chosen (if (string/starts-with? chosen "New page: ") ;; FIXME: What if a page named "New page: XXX"?
                        (subs chosen 10)
                        chosen)

+ 2 - 1
src/main/frontend/handler/web/nfs.cljs

@@ -21,6 +21,7 @@
             [promesa.core :as p]
             [frontend.mobile.util :as mobile-util]
             [logseq.graph-parser.util :as gp-util]
+            [logseq.graph-parser.config :as gp-config]
             [clojure.core.async :as async]))
 
 (defn remove-ignore-files
@@ -156,7 +157,7 @@
                                                                         (string/replace-first path (str dir-name "/") ""))
                                                              (let [last-part (last (string/split path "/"))]
                                                                (contains? #{config/app-name
-                                                                            config/default-draw-directory
+                                                                            gp-config/default-draw-directory
                                                                             (config/get-journals-directory)
                                                                             (config/get-pages-directory)}
                                                                           last-part)))))

+ 0 - 22
src/main/frontend/util.cljc

@@ -7,8 +7,6 @@
             ["@capacitor/status-bar" :refer [^js StatusBar Style]]
             ["grapheme-splitter" :as GraphemeSplitter]
             ["remove-accents" :as removeAccents]
-            [camel-snake-kebab.core :as csk]
-            [camel-snake-kebab.extras :as cske]
             [cljs-bean.core :as bean]
             [cljs-time.coerce :as tc]
             [cljs-time.core :as t]
@@ -142,18 +140,6 @@
 ;;   [fmt & args]
 ;;   (apply gstring/format fmt args))
 
-#?(:cljs
-   (defn json->clj
-     ([json-string]
-      (json->clj json-string false))
-     ([json-string kebab?]
-      (let [m (-> json-string
-                  (js/JSON.parse)
-                  (js->clj :keywordize-keys true))]
-        (if kebab?
-          (cske/transform-keys csk/->kebab-case-keyword m)
-          m)))))
-
 (defn remove-nils-non-nested
   [nm]
   (into {} (remove (comp nil? second)) nm))
@@ -670,14 +656,6 @@
     []
     (subvec xs start end)))
 
-(defn safe-subs
-  ([s start]
-   (let [c (count s)]
-     (safe-subs s start c)))
-  ([s start end]
-   (let [c (count s)]
-     (subs s (min c start) (min c end)))))
-
 #?(:cljs
    (defn get-nodes-between-two-nodes
      [id1 id2 class]

+ 16 - 0
src/main/logseq/graph_parser/config.cljs

@@ -0,0 +1,16 @@
+(ns ^:nbb-compatible logseq.graph-parser.config
+  "Config that is shared between graph-parser and rest of app"
+  (:require [logseq.graph-parser.util :as gp-util]
+            [clojure.string :as string]))
+
+(defonce local-assets-dir "assets")
+
+(defn local-asset?
+  [s]
+  (gp-util/safe-re-find (re-pattern (str "^[./]*" local-assets-dir)) s))
+
+(defonce default-draw-directory "draws")
+
+(defn draw?
+  [path]
+  (string/starts-with? path default-draw-directory))

+ 15 - 1
src/main/logseq/graph_parser/util.cljs

@@ -1,4 +1,4 @@
-(ns logseq.graph-parser.util
+(ns ^:nbb-compatible logseq.graph-parser.util
   "Util fns shared between graph-parser and rest of app. Util fns only rely on
   clojure standard libraries."
   (:require [clojure.walk :as walk]
@@ -48,3 +48,17 @@
   [tag-name]
   (when (string? tag-name)
     (not (safe-re-find #"[# \t\r\n]+" tag-name))))
+
+(defn safe-subs
+  ([s start]
+   (let [c (count s)]
+     (safe-subs s start c)))
+  ([s start end]
+   (let [c (count s)]
+     (subs s (min c start) (min c end)))))
+
+(defn json->clj
+  [json-string]
+  (-> json-string
+      (js/JSON.parse)
+      (js->clj :keywordize-keys true)))

+ 6 - 6
src/test/frontend/modules/outliner/core_test.cljs

@@ -390,7 +390,7 @@
               (recur (conj result next) next)))
           result)))))
 
-(deftest ^:generative random-inserts
+(deftest ^:long random-inserts
   (testing "Random inserts"
     (transact-random-tree!)
     (let [c1 (get-blocks-count)
@@ -402,7 +402,7 @@
       (let [total (get-blocks-count)]
         (is (= total (+ c1 @*random-count)))))))
 
-(deftest ^:generative random-deletes
+(deftest ^:long random-deletes
   (testing "Random deletes"
     (transact-random-tree!)
     (dotimes [_i 100]
@@ -412,7 +412,7 @@
           (outliner-tx/transact! {:graph test-db}
             (outliner-core/delete-blocks! blocks {})))))))
 
-(deftest ^:generative random-moves
+(deftest ^:long random-moves
   (testing "Random moves"
     (transact-random-tree!)
     (let [c1 (get-blocks-count)
@@ -429,7 +429,7 @@
               (let [total (get-blocks-count)]
                 (is (= total (+ c1 @*random-count)))))))))))
 
-(deftest ^:generative random-move-up-down
+(deftest ^:long random-move-up-down
   (testing "Random move up down"
     (transact-random-tree!)
     (let [c1 (get-blocks-count)
@@ -445,7 +445,7 @@
             (let [total (get-blocks-count)]
               (is (= total (+ c1 @*random-count))))))))))
 
-(deftest ^:generative random-indent-outdent
+(deftest ^:long random-indent-outdent
   (testing "Random indent and outdent"
     (transact-random-tree!)
     (let [c1 (get-blocks-count)
@@ -461,7 +461,7 @@
             (let [total (get-blocks-count)]
               (is (= total (+ c1 @*random-count))))))))))
 
-(deftest ^:generative random-mixed-ops
+(deftest ^:long random-mixed-ops
   (testing "Random mixed operations"
     (transact-random-tree!)
     (let [c1 (get-blocks-count)