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
$ lein run -m build
$ node target/out-min/min.js
we made a Bar: #cemerick.foo.Bar{:a 1, :b 2}
Using cljsbuild:
$ lein cljsbuild once min
Compiling ClojureScript...
Compiling ["target/out-min/min.js"] from ["src"]...
Compiling ["target/out-min/min.js"] failed.
clojure.lang.ExceptionInfo: failed compiling file:/mnt/g/dev/clojure/failing-data-readers/src/cemerick/foo.c
ljs {:file #object[java.io.File 0x239678d "/mnt/g/dev/clojure/failing-data-readers/src/cemerick/foo.cljs"]}
at clojure.core$ex_info.invokeStatic(core.clj:4744)
at clojure.core$ex_info.invoke(core.clj:4744)
at cljs.compiler$compile_file$fn__4697.invoke(compiler.cljc:1552)
at cljs.compiler$compile_file.invokeStatic(compiler.cljc:1513)
at cljs.compiler$compile_file.invoke(compiler.cljc:1489)
at cljs.closure$compile_file.invokeStatic(closure.clj:540)
at cljs.closure$compile_file.invoke(closure.clj:531)
at cljs.closure$eval6952$fn__6953.invoke(closure.clj:609)
at cljs.closure$eval6888$fn__6889$G__6877__6896.invoke(closure.clj:493)
at cljs.closure$compile_sources$iter__7076__7080$fn__7081.invoke(closure.clj:954)
Caused by: java.lang.IllegalStateException: Attempting to call unbound fn: #'cemerick.foo/read-bar
at clojure.lang.Var$Unbound.throwArity(Var.java:45)
at clojure.lang.AFn.invoke(AFn.java:32)
at clojure.lang.Var.invoke(Var.java:381)
at clojure.tools.reader$read_tagged.invokeStatic(reader.clj:854)
at clojure.tools.reader$read_tagged.invoke(reader.clj:846)
at clojure.tools.reader$read_dispatch.invokeStatic(reader.clj:71)
at clojure.tools.reader$read_dispatch.invoke(reader.clj:66)
at clojure.tools.reader$read_STAR_.invokeStatic(reader.clj:924)
... 78 more
Subprocess failed
I don't know how or why, but the Clojure file that contains the data reader var/fn is not loaded properly, though it is loaded at some point (which you can verify by adding a top-level println expr to cemerick/foo/bar.clj). As seen above, this issue is not present when cljsbuild isn't used.
The text was updated successfully, but these errors were encountered:
In short, usage of custom tagged literals (aka "data readers") works as expected using
cljs.build.api
, but fails under cljsbuild.A reproducing project is available here:
https://github.com/cemerick/failing-cljsbuild-data-readers
Using
cljs.build.api
:Using cljsbuild:
I don't know how or why, but the Clojure file that contains the data reader var/fn is not loaded properly, though it is loaded at some point (which you can verify by adding a top-level println expr to
cemerick/foo/bar.clj
). As seen above, this issue is not present when cljsbuild isn't used.The text was updated successfully, but these errors were encountered: