This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-05
Channels
- # adventofcode (419)
- # aleph (8)
- # aws (6)
- # beginners (148)
- # boot (9)
- # cider (24)
- # cljs-dev (37)
- # cljsjs (8)
- # clojure (134)
- # clojure-android (6)
- # clojure-brasil (15)
- # clojure-dev (8)
- # clojure-dusseldorf (2)
- # clojure-greece (67)
- # clojure-italy (8)
- # clojure-japan (3)
- # clojure-russia (3)
- # clojure-spec (8)
- # clojure-uk (13)
- # clojurescript (54)
- # clojurex (6)
- # cursive (5)
- # data-science (12)
- # datomic (15)
- # defnpodcast (11)
- # emacs (25)
- # fulcro (95)
- # graphql (3)
- # lein-figwheel (1)
- # leiningen (27)
- # luminus (1)
- # lumo (6)
- # mount (2)
- # off-topic (112)
- # om (3)
- # onyx (24)
- # perun (3)
- # re-frame (20)
- # reagent (1)
- # reitit (2)
- # ring-swagger (13)
- # rum (10)
- # shadow-cljs (45)
- # spacemacs (24)
- # sql (2)
- # unrepl (78)
- # yada (1)
@grav I am. I managed to compile some simple script, but now I'm having some problems when I started requiring some library. The build process hangs indefinitely and when I interrupt it:
ERROR in file [object Object]
Function.cljs.core.ex_info.cljs$core$IFn$_invoke$arity$3 (NO_SOURCE_FILE <embedded>:1928:72)
Function.cljs.analyzer.error.cljs$core$IFn$_invoke$arity$3 (NO_SOURCE_FILE <embedded>:2539:92)
(NO_SOURCE_FILE <embedded>:6020:354)
z (NO_SOURCE_FILE <embedded>:6021:263)
Object.cljs.js.eval_str_STAR_ (NO_SOURCE_FILE <embedded>:6022:328)
Function.cljs.js.eval_str.cljs$core$IFn$_invoke$arity$5 (NO_SOURCE_FILE <embedded>:6025:508)
Object.lumo.repl.execute_text (NO_SOURCE_FILE <embedded>:6511:475)
Object.lumo.repl.execute_source (NO_SOURCE_FILE <embedded>:6517:370)
Object.lumo.repl.execute (NO_SOURCE_FILE <embedded>:6518:202)
Script execution interrupted.
ContextifyScript.Script.runInThisContext (vm.cljs:44:33)
Object.runInThisContext (vm.cljs:116:38)
()
(Object.lumo.repl.caching_node_eval)
(NO_SOURCE_FILE <embedded>:6020:273)
z (NO_SOURCE_FILE <embedded>:6021:263)
Object.cljs.js.eval_str_STAR_ (NO_SOURCE_FILE <embedded>:6022:328)
Function.cljs.js.eval_str.cljs$core$IFn$_invoke$arity$5 (NO_SOURCE_FILE <embedded>:6025:508)
Object.lumo.repl.execute_text (NO_SOURCE_FILE <embedded>:6511:475)
Object.lumo.repl.execute_source (NO_SOURCE_FILE <embedded>:6517:370)
Here's the build command as generated by calvin: https://gist.github.com/alepeino/67f0b2e3d5f7a1ec4f53dd134e68e4bb@alepeino not all the current Clojure library are Lumo-compatible. They specifically need to say that the are bootstrap or self-host compatible...or use no macros and be cljs compatible...so that might be the problem you are facing
@richiardiandrea oh ok, I just needed a http/xhr client. Tried "cljs-http", switched to "funcool/httpurr" and now I'm getting
Failed! Could not parse ns form jarful.core: Error: No protocol method IJavaScript.-requires defined for type cljs.core/PersistentVector: [:error #error {:message "failed compiling file:out/cljs/core.cljs", :data {:file "out/cljs/core.cljs"}, :cause #object[Error Error: No protocol method IJavaScript.-requires defined for type cljs.core/PersistentVector: [:error #error {:message "failed compiling file:out/process/env.cljs", :data {:file "out/process/env.cljs"}, :cause #object[Error Error: No protocol method IJavaScript.-requires defined for type cljs.core/PersistentVector: [:error #error {:message "Could not parse ns form process.env", :data {:tag :cljs/analysis-error}, :cause #object[TypeError TypeError: $$LUMO_GLOBALS.readSourcePaths is not a function]}]]}]]}]
at Object.cljs.core.missing_protocol (<embedded>:179:274)
at lumo$cljs_deps$_requires (evalmachine.<anonymous>:418:17)
at <embedded>:983:205
at cljs.core.LazySeq.fn (<embedded>:983:210)
(...)
What is it that makes a library self-host compatible or not? Thank you@alepeino Generally, if a ClojureScript library defines macros which themselves employ Java interop, that library won't work in self-hosted ClojureScript. This is because in self-hosted ClojureScript, the macros need to be compiled by the ClojureScript compiler (not the Clojure compiler).