You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Marginalia chokes on the #db/id literal form in the following -- if I comment that out, document generation for my entire project works fine. Note also that unit tests covering the following form work fine as well.
(defn insert-object [conn a b]
@(d/transact conn [{:db/id #db/id [:db.part/user]
:my-object/field1 a
:my-object/field2 b}]))
Stacktrace excerpt follows:
Exception in thread "main" java.lang.RuntimeException: Problem parsing near line 36 <> original reported cause is java.lang.IllegalStateException: Attempting to call unbound fn: #'datomic.db/id-literal -- java.lang.IllegalStateException: Attempting to call unbound fn: #'datomic.db/id-literal, compiling:(/private/var/folders/v2/yxn9b9h93lzgjsz645mblbt80000gt/T/form-init4190221877881120283.clj:1:124)
at clojure.lang.Compiler.load(Compiler.java:7142)
at clojure.lang.Compiler.loadFile(Compiler.java:7086)
at clojure.main$load_script.invoke(main.clj:274)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invoke(main.clj:307)
at clojure.main$null_opt.invoke(main.clj:342)
at clojure.main$main.doInvoke(main.clj:420)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Problem parsing near line 36 <> original reported cause is java.lang.IllegalStateException: Attempting to call unbound fn: #'datomic.db/id-literal -- java.lang.IllegalStateException: Attempting to call unbound fn: #'datomic.db/id-literal
at clojure.lang.LispReader.read(LispReader.java:218)
at marginalia.parser$parse_STAR_$fn__387$fn__390.invoke(parser.clj:120)
at marginalia.parser$parse_STAR_$fn__387.invoke(parser.clj:119)
at clojure.core$repeatedly$fn__4750.invoke(core.clj:4716)
at clojure.lang.LazySeq.sval(LazySeq.java:40)
at clojure.lang.LazySeq.seq(LazySeq.java:49)
The text was updated successfully, but these errors were encountered:
Thanks for reporting this. It seems that every time new literal syntax is introduced marginalia has trouble handling this like when clojurescript introduced js literals. Instead of patching over the problem every time it comes up, we are seriously going to look at how we're parsing.
I'm making the decision to patch over this problem and any other reader literal issues until I can get some time to experiment with using a new parsing library that solves the issue of new literals being added or until I get some time to make our current parser better at handling the extensibility of Clojure
Marginalia chokes on the
#db/id
literal form in the following -- if I comment that out, document generation for my entire project works fine. Note also that unit tests covering the following form work fine as well.Stacktrace excerpt follows:
Exception in thread "main" java.lang.RuntimeException: Problem parsing near line 36 <> original reported cause is java.lang.IllegalStateException: Attempting to call unbound fn: #'datomic.db/id-literal -- java.lang.IllegalStateException: Attempting to call unbound fn: #'datomic.db/id-literal, compiling:(/private/var/folders/v2/yxn9b9h93lzgjsz645mblbt80000gt/T/form-init4190221877881120283.clj:1:124)
at clojure.lang.Compiler.load(Compiler.java:7142)
at clojure.lang.Compiler.loadFile(Compiler.java:7086)
at clojure.main$load_script.invoke(main.clj:274)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invoke(main.clj:307)
at clojure.main$null_opt.invoke(main.clj:342)
at clojure.main$main.doInvoke(main.clj:420)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Problem parsing near line 36 <> original reported cause is java.lang.IllegalStateException: Attempting to call unbound fn: #'datomic.db/id-literal -- java.lang.IllegalStateException: Attempting to call unbound fn: #'datomic.db/id-literal
at clojure.lang.LispReader.read(LispReader.java:218)
at marginalia.parser$parse_STAR_$fn__387$fn__390.invoke(parser.clj:120)
at marginalia.parser$parse_STAR_$fn__387.invoke(parser.clj:119)
at clojure.core$repeatedly$fn__4750.invoke(core.clj:4716)
at clojure.lang.LazySeq.sval(LazySeq.java:40)
at clojure.lang.LazySeq.seq(LazySeq.java:49)
The text was updated successfully, but these errors were encountered: