This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-10
Channels
- # announcements (6)
- # babashka (38)
- # beginners (85)
- # biff (3)
- # calva (2)
- # cider (11)
- # clerk (14)
- # clj-kondo (6)
- # clj-on-windows (27)
- # clj-together (2)
- # cljsrn (18)
- # clojure (106)
- # clojure-austin (1)
- # clojure-belgium (1)
- # clojure-europe (19)
- # clojure-nl (1)
- # clojure-norway (9)
- # clojure-uk (2)
- # clr (2)
- # cryogen (1)
- # cursive (10)
- # datahike (3)
- # datavis (2)
- # datomic (15)
- # emacs (7)
- # graalvm (10)
- # graphql (20)
- # gratitude (1)
- # hyperfiddle (1)
- # improve-getting-started (23)
- # joyride (24)
- # london-clojurians (1)
- # lsp (22)
- # malli (4)
- # matcher-combinators (3)
- # membrane (13)
- # off-topic (1)
- # pathom (24)
- # polylith (9)
- # react (31)
- # reagent (9)
- # releases (1)
- # remote-jobs (1)
- # reveal (3)
- # shadow-cljs (50)
- # spacemacs (3)
- # specter (5)
- # xtdb (5)
Are there any known issues with declaring protocols in a file you want to show with clerk? With this code:
(ns clerk-debug)
(defprotocol Test
(hello [this]))
In a fresh repl:
(require '[nextjournal.clerk :as clerk])
(clerk/serve! {:browse? true})
(clerk/show! "src/clerk_debug.clj")
I'm getting the following error:
I can open an issue if desiredok, I think we fixed this in https://github.com/nextjournal/clerk/commit/3988bda0a20a3abd2261c0d7185bbffb8b890877
>> Also discovered cases where classes instead of symbols could end up in the dependency graph and introduced normalization to symbols.
Here's the stacktrace for future searchability:
#error {
:cause "class java.lang.Class cannot be cast to class clojure.lang.Symbol (java.lang.Class is in module java.base of loader 'bootstrap'; clojure.lang.Symbol is in unnamed module of loader 'app')"
:via
[{:type java.lang.ClassCastException
:message "class java.lang.Class cannot be cast to class clojure.lang.Symbol (java.lang.Class is in module java.base of loader 'bootstrap'; clojure.lang.Symbol is in unnamed module of loader 'app')"
:at [clojure.core$ns_resolve invokeStatic "core.clj" 4370]}]
:trace
[[clojure.core$ns_resolve invokeStatic "core.clj" 4370]
[clojure.core$ns_resolve invokeStatic "core.clj" 4360]
[clojure.core$resolve invokeStatic "core.clj" 4373]
[clojure.core$resolve invoke "core.clj" 4373]
[nextjournal.clerk.analyzer$symbol__GT_jar invokeStatic "analyzer.clj" 360]
[nextjournal.clerk.analyzer$symbol__GT_jar invoke "analyzer.clj" 359]
[nextjournal.clerk.analyzer$find_location invokeStatic "analyzer.clj" 381]
[nextjournal.clerk.analyzer$find_location invoke "analyzer.clj" 375]
[clojure.core$group_by$fn__8597 invoke "core.clj" 7224]
[clojure.core.protocols$iter_reduce invokeStatic "protocols.clj" 49]
[clojure.core.protocols$fn__8230 invokeStatic "protocols.clj" 75]
[clojure.core.protocols$fn__8230 invoke "protocols.clj" 75]
[clojure.core.protocols$fn__8178$G__8173__8191 invoke "protocols.clj" 13]
[clojure.core$reduce invokeStatic "core.clj" 6886]
[clojure.core$group_by invokeStatic "core.clj" 7214]
[clojure.core$group_by invoke "core.clj" 7214]
[nextjournal.clerk.analyzer$build_graph invokeStatic "analyzer.clj" 411]
[nextjournal.clerk.analyzer$build_graph invoke "analyzer.clj" 398]
[nextjournal.clerk.eval$_PLUS_eval_results invokeStatic "eval.clj" 218]
[nextjournal.clerk.eval$_PLUS_eval_results invoke "eval.clj" 215]
[nextjournal.clerk$show_BANG_ invokeStatic "clerk.clj" 58]
[nextjournal.clerk$show_BANG_ invoke "clerk.clj" 23]
[user$eval24836 invokeStatic "NO_SOURCE_FILE" 1]
[user$eval24836 invoke "NO_SOURCE_FILE" 1]
[clojure.lang.Compiler eval "Compiler.java" 7194]
[clojure.lang.Compiler eval "Compiler.java" 7149]
[clojure.core$eval invokeStatic "core.clj" 3215]
[clojure.core$eval invoke "core.clj" 3211]
[clojure.main$repl$read_eval_print__9206$fn__9209 invoke "main.clj" 437]
[clojure.main$repl$read_eval_print__9206 invoke "main.clj" 437]
[clojure.main$repl$fn__9215 invoke "main.clj" 458]
[clojure.main$repl invokeStatic "main.clj" 458]
[clojure.main$repl_opt invokeStatic "main.clj" 522]
[clojure.main$main invokeStatic "main.clj" 667]
[clojure.main$main doInvoke "main.clj" 616]
[clojure.lang.RestFn invoke "RestFn.java" 397]
[clojure.lang.AFn applyToHelper "AFn.java" 152]
[clojure.lang.RestFn applyTo "RestFn.java" 132]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.main main "main.java" 40]]}