Squashed commit of the following:

commit a2eee34d80
Merge: 3025c94d2 af41e7ea3
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Aug 4 23:08:38 2025 +0800

    Merge pull request #12009 from logseq/feat/hnswlib+transformer-js

    feat: semantic search

commit af41e7ea3d
Merge: a407035d8 3025c94d2
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Aug 4 23:08:23 2025 +0800

    Merge branch 'master' into feat/hnswlib+transformer-js

commit a407035d80
Author: Gabriel Horner <gabriel@logseq.com>
Date:   Mon Aug 4 10:41:55 2025 -0400

    fix: app and other builds no longer require shadow-cljs config hack

    Reverts bug fix for
    347323b7d6
    and for other builds. This bug no longer applies b/c :shared is no
    longer used or b/c of shadow-cljs update

commit 3025c94d28
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Aug 4 20:40:53 2025 +0800

    fix: checkbox property value should be aligned center

commit a918e5b6f1
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Sun Aug 3 16:58:19 2025 +0800

    enhance(ux): show edit button instead of 00:00 for datetime property

commit c2c8727f6c
Merge: be6929234 c9e446fd8
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Sun Aug 3 16:40:22 2025 +0800

    Merge branch 'master' into feat/hnswlib+transformer-js

commit be69292346
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Sun Aug 3 16:37:45 2025 +0800

    set *publishing?

commit 11eb0f38a6
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Sun Aug 3 14:33:47 2025 +0800

    use official @sqlite.org/sqlite-wasm instead of our fork

commit 74fa24cb1e
Author: Gabriel Horner <gabriel@logseq.com>
Date:   Fri Aug 1 19:20:59 2025 -0400

    fix: publishing no longer has bug requiring shadow-cljs config hack

    Reverts bug fix from
    a80a182a8f.
    Confirmed dev and release work for publishing. This bug may no longer
    apply b/c :shared is no longer used or b/c of shadow-cljs update

commit 182a51a85e
Author: Gabriel Horner <gabriel@logseq.com>
Date:   Fri Aug 1 17:56:39 2025 -0400

    fix: publishing app in prod mode

    Also fix watch-publishing-frontend which had stopped working awhile back
    with shadow-cljs update

commit f7e32108f2
Author: Gabriel Horner <gabriel@logseq.com>
Date:   Fri Aug 1 14:37:18 2025 -0400

    enhance(dev): add more workers and db ns to linters

commit cf4153b1cd
Author: Gabriel Horner <gabriel@logseq.com>
Date:   Fri Aug 1 13:49:31 2025 -0400

    fix: yarn watch

commit 1fe46682e4
Merge: 1e8d7de44 8c402676a
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Fri Aug 1 00:14:28 2025 +0800

    Merge branch 'master' into feat/hnswlib+transformer-js

commit 1e8d7de446
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Fri Aug 1 00:03:22 2025 +0800

    fix: load progress in shared worker

commit 1e84a21042
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Thu Jul 31 22:38:44 2025 +0800

    enhance: use sharedworker for inference to reduce memory usage

commit e8d6ae1a2f
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Thu Jul 31 22:02:13 2025 +0800

    disable qwen3 embedding

commit 67a0f7cd8c
Merge: 7e04733ac 0bfb458d9
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Thu Jul 31 20:08:29 2025 +0800

    Merge branch 'master' into feat/hnswlib+transformer-js

commit 7e04733acf
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Tue Jul 29 01:21:49 2025 +0800

    fix: lint

commit 5ee795171c
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Tue Jul 29 01:19:26 2025 +0800

    enhance: display show more by default

commit a9e9149350
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Tue Jul 29 01:17:22 2025 +0800

    fix: add score for non-matched results

commit d1cabafcc2
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Tue Jul 29 00:53:24 2025 +0800

    ensure db/id is not great than 2147483647 for embedding

commit 0816c6a985
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Tue Jul 29 00:15:51 2025 +0800

    remove jina embeddings for now

commit 74fb1194e9
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Tue Jul 29 00:08:46 2025 +0800

    adjust weights for keyword search and semantic search

commit 6e95bb1801
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 28 19:38:53 2025 +0800

    re-enable malli dev

commit 47132b395e
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 28 19:23:04 2025 +0800

    fix: tweet embed

commit 238b071b62
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 28 19:11:41 2025 +0800

    fix: workflows

commit 44fb03b0ae
Merge: 88dfaf8eb cb65cb88a
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 28 18:35:20 2025 +0800

    Merge branch 'master' into feat/hnswlib+transformer-js

commit 88dfaf8ebd
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 28 18:31:29 2025 +0800

    fix: mobile build

commit 7f18e941d0
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 28 16:26:56 2025 +0800

    separate config for app and mobile

commit 0c3697e972
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 28 12:50:06 2025 +0800

    fix: add workers to rtc test workflow

commit 18914d2fa2
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 28 12:43:24 2025 +0800

    fix: add workers to mobile and electron release

commit af33e6964b
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 28 12:30:30 2025 +0800

    fix: ns

commit 110f5b18e5
Merge: dcd6d7414 654e6d1b7
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 28 12:29:32 2025 +0800

    Merge branch 'master' into feat/hnswlib+transformer-js

commit dcd6d74146
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 28 12:26:49 2025 +0800

    fix: typo

commit c71e51bc78
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 28 12:23:56 2025 +0800

    add webpack to release-mobile

commit 44d6c12731
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 28 12:21:35 2025 +0800

    update output-feature-set to es-next-in

commit 65afa1e762
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 28 12:20:11 2025 +0800

    fix: lint

commit d488c53fd6
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Jul 23 22:12:20 2025 +0800

    adjust page/object sorting weight

commit 6a22385f0b
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Jul 23 20:54:29 2025 +0800

    replace uuid ref with block title when embedding

commit 0f48207329
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Jul 23 20:48:55 2025 +0800

    add tags to embedding

commit 48ae054ce8
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Jul 23 20:22:22 2025 +0800

    fix: lint

commit aeeaad3eb0
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Jul 23 20:12:19 2025 +0800

    fix: embedding status

commit 9335281d4a
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Jul 23 15:25:50 2025 +0800

    fix: webpack release failed to require path

commit 4b935df5d3
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Jul 23 14:42:54 2025 +0800

    fix: katex path

commit 5d7f56361a
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Jul 23 14:36:10 2025 +0800

    downgrade shadow-cljs

commit f86be0f3a8
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Jul 23 13:11:15 2025 +0800

    add more externs

commit 31004ee371
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Jul 23 12:40:25 2025 +0800

    wip: webpack release build

commit dbe2708e5e
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 21 22:46:02 2025 +0800

    Add webpack build

commit 0722688fd8
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 21 21:47:36 2025 +0800

    feat: hybrid search

commit 337b28e5d4
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 21 20:53:35 2025 +0800

    set batch size to 500

commit 2c27aee09d
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 21 20:14:14 2025 +0800

    use db/id for hnsw label

    Because db/id is unique, auto-increment so that old ids are not re-used.

commit f1d8e526fc
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 21 17:44:45 2025 +0800

    enhance: set embedding distance to 0.3 to keep search result related

commit bf3af0fedd
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 21 17:21:20 2025 +0800

    perf: skip refresh ui for embedding data transactions

commit 690b92c975
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 21 17:15:06 2025 +0800

    enhance: adjust batch embedding size to cut down resource usage

commit 3f20f44790
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 21 17:06:17 2025 +0800

    enhance: add embedding indicator

commit 2e65b639dc
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 21 16:37:35 2025 +0800

    fix: cancel index when switching to another model

commit ae78fc65c4
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 21 16:22:17 2025 +0800

    enhance: start embedding after selected a model

commit 910c8f448f
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 21 16:13:17 2025 +0800

    Use missionary clock for auto embedding

commit b23f9e28a2
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Jul 21 13:30:45 2025 +0800

    feat: add semantic search result when searching blocks

commit f296c1e67d
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Sat Jul 19 15:32:16 2025 +0800

    fix: auto embedding stops when switching graph

commit a5270a05e1
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Sat Jul 19 15:17:11 2025 +0800

    fix: inference worker js path

commit 91d3ab70fb
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Sat Jul 19 15:15:24 2025 +0800

    enhance: don't update index info if there's no block update

commit de80615c5f
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Sat Jul 19 14:36:11 2025 +0800

    enhance: index embedding for updated blocks every 30s

commit 133b5e497a
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Jul 16 18:59:38 2025 +0800

    enhance(ux): show embedding model download progress

commit 00405d98d3
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Jul 16 15:59:22 2025 +0800

    add local embedding model settings

commit 88f62e86ec
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Jul 16 14:40:18 2025 +0800

    perf improvement

commit 4b0cb79d0d
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Jul 16 04:02:22 2025 +0800

    fix: vector search

commit bfed2e3bc6
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Tue Jul 15 17:49:01 2025 +0800

    Add qwen3 embedding

commit f3e1da67c7
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Tue Jul 15 16:52:30 2025 +0800

    fix: infer worker doesn't work

commit e1147c3264
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Tue Jul 15 15:59:01 2025 +0800

    fix: c.m/run-task args

commit 2d50ca5ce2
Merge: ca558450c 24e3a08b0
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Fri Jul 11 18:15:33 2025 +0800

    Merge branch 'master' into feat/hnswlib+transformer-js

commit ca558450c1
Merge: 1f31f08bf 1565e7541
Author: rcmerci <rcmerci@gmail.com>
Date:   Fri Mar 21 15:42:50 2025 +0800

    Merge remote-tracking branch 'origin/feat/db' into feat/hnswlib+transformer-js

commit 1f31f08bf6
Author: rcmerci <rcmerci@gmail.com>
Date:   Fri Mar 21 15:37:34 2025 +0800

    fix(vec-search): new-hnsw-index when force-reset-index

commit bb226a4147
Author: rcmerci <rcmerci@gmail.com>
Date:   Fri Mar 21 01:38:39 2025 +0800

    feat(vec-search): debug ui show load-model-progress

commit a7273847bc
Author: rcmerci <rcmerci@gmail.com>
Date:   Thu Mar 20 22:27:56 2025 +0800

    feat(vec-search): debug ui support selecting model

commit 47c24177a6
Author: rcmerci <rcmerci@gmail.com>
Date:   Tue Mar 18 23:37:10 2025 +0800

    feat(vec-search): update debug ui

commit cd44e77ac9
Author: rcmerci <rcmerci@gmail.com>
Date:   Tue Mar 18 21:55:51 2025 +0800

    feat(vec-search): add debug-ui at sidebar

commit 328b38db30
Author: rcmerci <rcmerci@gmail.com>
Date:   Tue Mar 18 18:37:25 2025 +0800

    feat(embedding): add vector-search-state-flows

commit 6b8c1dde93
Author: rcmerci <rcmerci@gmail.com>
Date:   Tue Mar 18 15:43:44 2025 +0800

    feat(embedding): check webgpu available

commit 624f839bbf
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Sun Mar 16 12:08:11 2025 +0800

    fix: can't use fuse.js

commit 38e4b0d9b2
Merge: b19f0d91c a55137049
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Sun Mar 16 11:52:32 2025 +0800

    Merge branch 'feat/db' into feat/hnswlib+transformer-js

commit b19f0d91ca
Author: rcmerci <rcmerci@gmail.com>
Date:   Sat Mar 15 23:48:26 2025 +0800

    enhance(embedding): add user-defined class/prop

commit 0c82a420c7
Author: rcmerci <rcmerci@gmail.com>
Date:   Sat Mar 15 22:56:45 2025 +0800

    fix: use d/entity instead of d/pull

    because :block/title in entity will replace :block/uuid by its block/title

commit 2c88070fe0
Author: rcmerci <rcmerci@gmail.com>
Date:   Sat Mar 15 22:43:28 2025 +0800

    fix: remove outdated hnsw-label

commit a5db52bf37
Author: rcmerci <rcmerci@gmail.com>
Date:   Sat Mar 15 20:56:22 2025 +0800

    feat(embedding): text-embedding graph blocks and query hnsw

    new properties:
    :logseq.property.embedding/hnsw-label,
    :logseq.property.embedding/hnsw-label-updated-at

    add ns frontend.worker.embedding

commit 5f02b7c863
Author: rcmerci <rcmerci@gmail.com>
Date:   Sat Mar 15 15:30:44 2025 +0800

    dev: update cljfmt.edn

commit d48a30000d
Author: rcmerci <rcmerci@gmail.com>
Date:   Fri Mar 14 17:30:25 2025 +0800

    enhance(text-embedding): add api delete-labels

commit eda3928937
Author: rcmerci <rcmerci@gmail.com>
Date:   Fri Mar 14 16:45:14 2025 +0800

    enhance(text-embedding): connect db-worker and infer-worker

commit 53cc7485d8
Author: rcmerci <rcmerci@gmail.com>
Date:   Thu Mar 13 22:42:31 2025 +0800

    enhance(text-embedding): smaller init-max-elems, dynamically resizeIndex

commit 95c0f2ef1c
Author: rcmerci <rcmerci@gmail.com>
Date:   Thu Mar 13 22:07:30 2025 +0800

    feat: init add frontend.inference-worker.text-embedding

commit e2271dd03d
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Thu Mar 13 21:00:35 2025 +0800

    use forked sqlite-wasm

commit c269046b44
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Tue Mar 11 16:21:44 2025 +0800

    Revert "disable js-toast temporally to open the app"

    This reverts commit da1c4dd465.

commit ebeeb280ef
Author: charlie <xyhp915@qq.com>
Date:   Tue Mar 11 16:16:37 2025 +0800

    enhance(webpack): add externals for React and ReactDOM

commit da1c4dd465
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Tue Mar 11 15:57:14 2025 +0800

    disable js-toast temporally to open the app

commit 8f1b610361
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Tue Mar 11 15:51:22 2025 +0800

    chore: remove unused package

commit 68426d54eb
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Tue Mar 11 15:30:24 2025 +0800

    get rid of shared module

commit 0ecf65aefb
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Tue Mar 11 13:37:42 2025 +0800

    chore: use official sqlite-wasm

commit e36543256f
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Mar 10 17:23:14 2025 +0800

    fix: worker repl

commit b122d453c2
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Mar 10 17:20:39 2025 +0800

    separate :workers build

commit 849ffd3329
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Mar 10 16:23:52 2025 +0800

    prepend bundle to worker js output

commit 5632c29ba0
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Mon Mar 10 15:05:19 2025 +0800

    wip: webpack integration

commit 1c46e0205e
Author: rcmerci <rcmerci@gmail.com>
Date:   Mon Mar 10 12:08:44 2025 +0800

    init add inference-worker
This commit is contained in:
rcmerci
2025-08-05 00:48:29 +08:00
parent 0a36006288
commit 5179949902
103 changed files with 3255 additions and 990 deletions

View File

@@ -195,11 +195,11 @@
(map #(vector % (str % "_Class")))
(into {}))]
(when (seq renamed-classes)
(if verbose
(println "Renaming the following classes because they have names that conflict with Logseq's case insensitive :block/name:"
(keys renamed-classes) "\n")
(when (pos? (count renamed-classes))
(println "Renaming" (count renamed-classes) "classes due to page name conflicts"))))
(if verbose
(println "Renaming the following classes because they have names that conflict with Logseq's case insensitive :block/name:"
(keys renamed-classes) "\n")
(when (pos? (count renamed-classes))
(println "Renaming" (count renamed-classes) "classes due to page name conflicts"))))
renamed-classes))
(defn- get-all-properties [schema-data {:keys [verbose]}]

View File

@@ -1,17 +1,17 @@
(ns logseq.tasks.dev
"Tasks for general development. For desktop or mobile development see their
namespaces"
(:require [babashka.process :refer [shell]]
(:require [babashka.cli :as cli]
[babashka.fs :as fs]
[babashka.cli :as cli]
[logseq.tasks.util :as task-util]
[logseq.tasks.dev.lint :as dev-lint]
[babashka.process :refer [shell]]
[clojure.core.async :as async]
[clojure.data :as data]
[clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.pprint :as pp]
[clojure.edn :as edn]
[clojure.data :as data]
[clojure.core.async :as async]
[clojure.string :as string]))
[clojure.string :as string]
[logseq.tasks.dev.lint :as dev-lint]
[logseq.tasks.util :as task-util]))
(defn test
"Run tests. Pass args through to cmd 'yarn cljs:run-test'"
@@ -75,7 +75,7 @@
(fs/glob "." "{src/main,deps/graph-parser/src}/**")))))]
(do
(println "Building publishing js asset...")
(shell "clojure -M:cljs release publishing"))
(shell "clojure -M:cljs release publishing workers"))
(println "Publishing js asset is up to date")))
(defn publishing-backend
@@ -87,7 +87,7 @@
(defn watch-publishing-frontend
[& _args]
(shell "clojure -M:cljs watch publishing"))
(shell "npx shadow-cljs watch publishing"))
(defn watch-publishing-backend
"Builds publishing backend once watch-publishing-frontend has built initial frontend"
@@ -110,4 +110,4 @@
(let [db-graph (fs/path parent-graph-dir (fs/file-name file-graph))]
(println "Importing" (str db-graph) "...")
(apply shell "bb" "dev:db-import" file-graph db-graph import-options)
(shell "bb" "dev:validate-db" db-graph "-gHc")))))
(shell "bb" "dev:validate-db" db-graph "-gHc")))))

View File

@@ -18,7 +18,8 @@
"electron.db"
"frontend.handler.db-based."
"frontend.worker.handler.page.db-based"
"frontend.components.property" "frontend.components.class" "frontend.components.quick-add"
"frontend.inference-worker"
"frontend.components.property" "frontend.components.class" "frontend.components.quick-add" "frontend.components.vector-search"
"frontend.components.db-based" "frontend.components.objects" "frontend.components.query.view"
"mobile.core" "mobile.events" "mobile.externals" "mobile.init" "mobile.ionic" "mobile.state"
"mobile.components"]))
@@ -58,8 +59,10 @@
"src/main/frontend/components/property"
"src/main/frontend/components/objects.cljs"
"src/main/frontend/components/quick_add.cljs"
"src/main/frontend/components/vector_search"
"src/main/frontend/components/db_based"
"src/main/frontend/components/query/view.cljs"
"src/main/frontend/inference_worker"
"src/electron/electron/db.cljs"
"src/main/mobile"]))

View File

@@ -43,13 +43,14 @@
(when (pos? (:exit res)) (System/exit (:exit res)))))
(println "No clj* files have changed to lint."))))
(defn- validate-frontend-not-in-worker
(defn- validate-frontend-not-in-workers
[]
(let [res (shell {:out :string}
"git grep -h" "\\[frontend.*:as" "src/main/frontend/worker")
"git grep -h" "\\[frontend.*:as"
"src/main/frontend/worker" "src/main/frontend/worker_common" "src/main/frontend/inference_worker")
req-lines (->> (:out res)
string/split-lines
(remove #(re-find #"frontend\.worker|frontend\.common" %)))]
(remove #(re-find #"frontend\.worker|frontend\.common|frontend\.inference-worker" %)))]
(if (seq req-lines)
(do
@@ -58,10 +59,10 @@
(System/exit 1))
(println "Valid worker namespaces!"))))
(defn- validate-worker-not-in-frontend
(defn- validate-workers-not-in-frontend
[]
(let [res (shell {:out :string :continue true}
"grep -r --exclude-dir=worker" "\\[frontend.worker.*:" "src/main/frontend")
"grep -r --exclude-dir=worker --exclude-dir=inference_worker" "\\[frontend.worker.*:" "src/main/frontend")
;; allow reset-file b/c it's only affects tests
allowed-exceptions #{"src/main/frontend/handler/file_based/file.cljs: [frontend.worker.file.reset :as file-reset]"}
invalid-lines (when (= 0 (:exit res))
@@ -75,8 +76,7 @@
(println "Valid frontend namespaces!"))))
(defn worker-and-frontend-separate
"Ensures worker is independent of frontend"
"Ensures workers are independent of frontend"
[]
(validate-frontend-not-in-worker)
(validate-worker-not-in-frontend))
(validate-frontend-not-in-workers)
(validate-workers-not-in-frontend))