Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Find namespaces for nbb-compatible CI step
- Loading branch information
1 parent
8b9c64a
commit d608215
Showing
6 changed files
with
36 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
(ns logseq.tasks.nbb | ||
(:require [pod.borkdude.clj-kondo :as clj-kondo])) | ||
|
||
(defn- fetch-meta-namespaces | ||
"Return namespaces with metadata" | ||
[paths] | ||
(let [paths (or (seq paths) ["src"]) | ||
{{:keys [namespace-definitions]} :analysis} | ||
(clj-kondo/run! | ||
{:lint paths | ||
:config {:output {:analysis {:namespace-definitions {:meta true}}}}}) | ||
matches (keep (fn [m] | ||
(when (:meta m) | ||
{:ns (:name m) | ||
:meta (:meta m)})) | ||
namespace-definitions)] | ||
matches)) | ||
|
||
(defn load-compatible-namespaces | ||
[] | ||
(let [namespaces (filter #(get-in % [:meta :nbb-compatible]) | ||
(fetch-meta-namespaces ["src/main"]))] | ||
(assert (seq namespaces) | ||
"There must be some nbb-compatible namespaces"))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
(ns frontend.db-schema) | ||
(ns ^:nbb-compatible frontend.db-schema) | ||
|
||
(defonce version 1) | ||
(defonce ast-version 1) | ||
|