This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-07
Channels
- # beginners (166)
- # cider (6)
- # cljs-dev (12)
- # cljsrn (64)
- # clojure (71)
- # clojure-chicago (1)
- # clojure-spec (14)
- # clojure-uk (2)
- # clojurescript (25)
- # datomic (2)
- # docs (1)
- # duct (1)
- # emacs (4)
- # fulcro (5)
- # graphql (3)
- # java (46)
- # mount (5)
- # off-topic (29)
- # onyx (1)
- # portkey (10)
- # re-frame (12)
- # remote-jobs (1)
- # shadow-cljs (46)
- # spacemacs (1)
- # specter (4)
- # vim (2)
I've typed a sdfçlj asdlfkj asd on my cljs file, and It appeared as a Warning. Is that right ? I didnt see an Error yet, just Warning .
Use of undeclared Var guts.http/asdlfkj
Every non sensical word became Use of undeclared Var as a Warning
@troglotit if you mean webpack loaders like image loaders and css loaders, the answer is no, shadow doesn’t do that for you
is there a way to run a node js script via shadow-cljs? My workflow for a thing is, I compile a node script, then run it via node ...
, and I’m looking for a cleaner way to do things.
@thheller try to write a target for react native, met this error.
JS runtime connected.
[2018-04-07 19:16:05 - ERROR] UT005071: Undertow request failed HttpServerExchange{ POST /worker/files/app/467f79fb-e0e5-4f7b-9df5-56e803f4cf44/1998cbc0-21d4-4a18-a69f-aa7b9dff54f0 request {Connection=[keep-alive], Accept=[*/*], Accept-Language=[en-us], Accept-Encoding=[gzip, deflate], Content-Type=[application/edn; charset=utf-8], Content-Length=[303], User-Agent=[HelloRN/1 CFNetwork/893.14 Darwin/16.7.0], Host=[0.0.0.0:9630]} response {}}
clojure.lang.ExceptionInfo: no output for id: [:shadow.build.classpath/resource "clojure/walk.cljs"] {:resource-id [:shadow.build.classpath/resource "clojure/walk.cljs"]}
at clojure.core$ex_info.invokeStatic(core.clj:4739)
at clojure.core$ex_info.invoke(core.clj:4739)
at shadow.build.data$get_output_BANG_.invokeStatic(data.clj:168)
at shadow.build.data$get_output_BANG_.invoke(data.clj:164)
at $files_req$fn__19941.invoke(ws.clj:221)
at clojure.core$map$fn__5587.invoke(core.clj:2745)
at clojure.lang.LazySeq.sval(LazySeq.java:40)
at clojure.lang.LazySeq.seq(LazySeq.java:49)
at clojure.lang.RT.seq(RT.java:528)
at clojure.core$seq__5124.invokeStatic(core.clj:137)
at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:24)
at clojure.core.protocols$fn__7835.invokeStatic(protocols.clj:75)
at clojure.core.protocols$fn__7835.invoke(protocols.clj:75)
at clojure.core.protocols$fn__7781$G__7776__7794.invoke(protocols.clj:13)
at clojure.core$reduce.invokeStatic(core.clj:6748)
at clojure.core$into.invokeStatic(core.clj:6815)
at clojure.core$into.invoke(core.clj:6807)
at $files_req.invokeStatic(ws.clj:245)
at $files_req.invoke(ws.clj:173)
at $process_req.invokeStatic(ws.clj:283)
at $process_req.invoke(ws.clj:253)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$apply.invoke(core.clj:652)
at shadow.http.router$call_handler.invokeStatic(router.clj:12)
at shadow.http.router$call_handler.invoke(router.clj:11)
at shadow.cljs.devtools.server.web$root.invokeStatic(web.clj:160)
at shadow.cljs.devtools.server.web$root.invoke(web.clj:159)
at shadow.cljs.devtools.server$get_ring_handler$fn__21898.invoke(server.clj:60)
at ring.middleware.resource$wrap_resource$fn__21453.invoke(resource.clj:37)
at ring.middleware.resource$wrap_resource$fn__21453.invoke(resource.clj:37)
at ring.middleware.params$wrap_params$fn__19405.invoke(params.clj:67)
at shadow.cljs.devtools.server.ring_gzip$wrap_gzip$fn__21523.invoke(ring_gzip.clj:94)
at shadow.undertow$ring_STAR_$reify__21609.handleRequest(undertow.clj:28)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:360)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
I found the code
https://github.com/thheller/shadow-cljs/blob/0749e08322f5059e255fb3eb41a0f3c63c29c1d3/src/main/shadow/build/data.clj#L164don't know why there's no clojure/walk
in :output
of state, there're clojure/string
, clojure/data
, etc.
I've just updated to shadow-cljs 2.2.25, and stuff that used to work in the JS interop stopped working; I'm requiring a js file (with ["/gen/editor" :as editor], which in turn requires some npm modules; some of those npm modules are in commonjs format, so I use a "const omit = require('ramda/src/omit') for example instead of an ES6 import, to avoid the .default
however, shadow-cljs (or cljs? or something?) now always seems to add .default to the uses of that
var module$node_modules$ramda$src$omit = shadow.js.require("module$node_modules$ramda$src$omit", {});
is there a way to avoid that automatic appending of .default to anything imported in JS?
this is what is in the cljs-runtime/module$node_modules$ramda$src$omit.js file: shadow$provide.module$node_modules$ramda$src$omit=function(e,k,a,p,f){e=a("module$node_modules$ramda$src$internal$_curry2")(function(a,e){for(var c={},f={},g=0,k=a.length;g<k;)f[a[g]]=1,g+=1;for(var p in e)f.hasOwnProperty(p)||(c[p]=e[p]);return c});p.exports=e}
here's a reproducer, fwiw: https://github.com/bwalex/shadowcljs-cjs-issue
somehow trying to revert to 2.0.138 causes all sorts of other weird issues now. great.
ok, interesting - they just broke compatibility with everything in closure compiler itself
on a slightly unrelated note, though, with the latest shadow-cljs I keep running into issues where it can't reload the js namespaces properly, though
[:app] Build failure: no source by provide: module$gen$abc {:provide module$gen$abc} ExceptionInfo: no source by provide: module$gen$abc
hello, I’m trying to follow this guide and it’s unclear to me what I need to do after I run shadow-cljs watch app
the article seems to imply that my browser should load something
is that automatic or do I have to point it somewhere?
Perhaps this is a bit more up to date? https://github.com/shadow-cljs/quickstart-browser
thanks, reading
this guide is much more complete, many thanks
Note that there is an official user manual that for some reason doesn’t appear very high on Google: https://shadow-cljs.github.io/docs/UsersGuide.html
@orestis I did see that, but I think it’s better suited as a reference rather than a guide to a newcomer!
I found myself jumping around in that manual, struggling to form a complete picture
so another question: is figwheel still superior in terms of reloading?
No idea about superiority, but it is claimed that shadow provides the necessary functionality.
good strategy 😄