Skip to content

Commit

Permalink
Merge pull request #5 from scicloj/refer-clojure-exclude
Browse files Browse the repository at this point in the history
Avoid warnings about Clojure core symbols
  • Loading branch information
daslu authored Oct 15, 2023
2 parents e323d61 + 128e395 commit a0c514c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion dev/scicloj/kindly/gen.clj
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,18 @@
(str/join \newline
(map kind-fn kinds))))))

(defn excludes [all-kinds]
(let [cc (find-ns 'clojure.core)]
(vec (for [[category kinds] all-kinds
[kind] kinds
:when (ns-resolve cc kind)]
kind))))

(defn kind-ns [all-kinds]
(str "(ns scicloj.kindly.v4.kind
\"Kinds for visualization\"
(:require [scicloj.kindly.v4.api :refer [attach-kind-to-value]]))
(:require [scicloj.kindly.v4.api :refer [attach-kind-to-value]])
(:refer-clojure :exclude " (excludes all-kinds) "))
" (kind-fns all-kinds) \newline))

Expand Down
3 changes: 2 additions & 1 deletion src/scicloj/kindly/v4/kind.cljc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(ns scicloj.kindly.v4.kind
"Kinds for visualization"
(:require [scicloj.kindly.v4.api :refer [attach-kind-to-value]]))
(:require [scicloj.kindly.v4.api :refer [attach-kind-to-value]])
(:refer-clojure :exclude [test seq vector set map]))

;; ## simple behaviours

Expand Down

0 comments on commit a0c514c

Please sign in to comment.