This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-26
Channels
- # arachne (80)
- # beginners (76)
- # boot (16)
- # cider (66)
- # cljs-dev (62)
- # cljsjs (1)
- # clojure (106)
- # clojure-dev (5)
- # clojure-greece (2)
- # clojure-italy (9)
- # clojure-russia (1)
- # clojure-spec (61)
- # clojure-uk (130)
- # clojurescript (21)
- # core-async (9)
- # cursive (3)
- # datomic (37)
- # events (41)
- # figwheel (31)
- # fulcro (27)
- # hoplon (1)
- # jobs (2)
- # lumo (11)
- # off-topic (155)
- # re-frame (71)
- # reagent (27)
- # ring-swagger (3)
- # shadow-cljs (132)
- # spacemacs (5)
- # specter (1)
- # sql (37)
- # test-check (10)
- # uncomplicate (5)
- # unrepl (2)
- # yada (3)
Anyone got a solution to this:
Uncaught TypeError: goog.net.jsloader.load is not a function
at figwheel$client$file_reloading$reload_file_in_html_env (file_reloading.cljs?rel=1516980062278:208)
at figwheel$client$file_reloading$reload_file (file_reloading.cljs?rel=1516980062278:250)
at figwheel$client$file_reloading$blocking_load (file_reloading.cljs?rel=1516980062278:269)
at file_reloading.cljs?rel=1516980062278:279
at file_reloading.cljs?rel=1516980062278:277
at figwheel$client$file_reloading$state_machine__59709__auto____1 (file_reloading.cljs?rel=1516980062278:277)
at figwheel$client$file_reloading$state_machine__59709__auto__ (file_reloading.cljs?rel=1516980062278:277)
at cljs$core$async$impl$ioc_helpers$run_state_machine (ioc_helpers.cljs?rel=1516980058153:35)
at cljs$core$async$impl$ioc_helpers$run_state_machine_wrapped (ioc_helpers.cljs?rel=1516980058153:39)
at ioc_helpers.cljs?rel=1516980058153:48
I'm trying to get Arachne Figwheel to reload JS, but the first time the changes are pushed to the browser this error occurs, and then code reloading is broken.org.arachne-framework/arachne-figwheel {:mvn/version "0.2.0-master-0032-bb33280"}
org.arachne-framework/arachne-pedestal {:mvn/version "0.2.0-master-0064-fb2edbc"}
org.arachne-framework/arachne-sass {:mvn/version "0.2.0-master-0034-1769b93"}
org.arachne-framework/pedestal-assets {:mvn/version "0.2.0-master-0019-580de8f"}
I've also had to disable the ::webjars
config because I get a spec failure with some ZIP object in place of a directory.
@jcf hmm, I haven’t ever seen that before. Any chance you could post your config script including what your cljs compiler settings are?
And here's the exception from webjars not being happy:
ExceptionInfo Call to #'arachne.fileset/add did not conform to spec:
In: [1] val: #object[com.sun.nio.zipfs.ZipPath 0x55b26a2b "/META-INF/resources/webjars"] fails spec: :arachne.fileset.specs/directory at: [:args :directory] predicate: (fn [f] (and (instance? java.io.File f) (.isDirectory f)))
{:clojure.spec.alpha/problems [{:path [:args :directory], :pred (clojure.core/fn [f] (clojure.core/and (clojure.core/instance? java.io.File f) (.isDirectory f))), :val #object[com.sun.nio.zipfs.ZipPath 0x55b26a2b "/META-INF/resources/webjars"], :via [:arachne.fileset.specs/directory :arachne.fileset.specs/directory], :in [1]}], :clojure.spec.alpha/spec #object[clojure.spec.alpha$regex_spec_impl$reify__2436 0x6d2bdcdc "clojure.spec.alpha$regex_spec_impl$reify__2436@6d2bdcdc"], :clojure.spec.alpha/value (#arachne.fileset.impl.TmpFileSet{:tree {}, :blob #object[java.io.File 0x47780f5c "/tmp/arachne-fs1560548959238895091"], :scratch #object[java.io.File 0x31a747 "/tmp/arachne-fs3449467318418299623"], :cache #object[java.io.File 0x6b214f83 "/tmp/arachne-fs283219324983436992"]} #object[com.sun.nio.zipfs.ZipPath 0x55b26a2b "/META-INF/resources/webjars"]), :clojure.spec.alpha/args (#arachne.fileset.impl.TmpFileSet{:tree {}, :blob #object[java.io.File 0x47780f5c "/tmp/arachne-fs1560548959238895091"], :scratch #object[java.io.File 0x31a747 "/tmp/arachne-fs3449467318418299623"], :cache #object[java.io.File 0x6b214f83 "/tmp/arachne-fs283219324983436992"]} #object[com.sun.nio.zipfs.ZipPath 0x55b26a2b "/META-INF/resources/webjars"]), :clojure.spec.alpha/failure :instrument, :clojure.spec.test.alpha/caller {:file "pipeline.clj", :line 135, :var-scope arachne.assets.pipeline/classpath-fileset, :local-fn fn}}
clojure.core/ex-info (core.clj:4739)
clojure.core/ex-info (core.clj:4739)
clojure.spec.test.alpha/spec-checking-fn/conform!--2938 (alpha.clj:131)
clojure.spec.test.alpha/spec-checking-fn/fn--2943 (alpha.clj:139)
arachne.assets.pipeline/classpath-fileset/fn--32336 (pipeline.clj:135)
clojure.core.protocols/fn--7852 (protocols.clj:168)
clojure.core.protocols/fn--7852 (protocols.clj:124)
clojure.core.protocols/fn--7807/G--7802--7816 (protocols.clj:19)
clojure.core.protocols/seq-reduce (protocols.clj:31)
clojure.core.protocols/fn--7833 (protocols.clj:75)
clojure.core.protocols/fn--7833 (protocols.clj:75)
clojure.core.protocols/fn--7781/G--7776--7794 (protocols.clj:13)
I have (def dev? (constantly true))
, and my cljs-opts
:
(def cljs-opts {:main 'usr.client
:optimizations (if (dev?) :none :advanced)
:asset-path "/js/out"
:output-to "js/app.js"
:output-dir "js/out"
:source-map-timestamp true})
Commenting out the ::webjars
input-dir and related pipeline entries circumvents the spec error with a ZipPath
.
I'm not using any webjars so don't need that for now. I can open an issue/PR that changes the spec so zipped ditties are accepted…
right, so that error is (fairly) straightforward, apparently a directory in a Zip is not considered a directory and therefore can’t be used in Arachne’s asset pipeline. That definitely is something that should be enhanced
how private is this project? Is it the kind of thing you would be willing to clone and let me reproduce locally? I will continue to think about it but honestly with FactUI and some other client work my head has been out of the asset pipeline for a while.
Oh, and I'm doing some gnarly stuff with deps.edn
mixed with Leiningen because I want to try out something simpler (ultimately Arachne + tools.deps).
I need to go pick up my kid right now but I will to reproduce your problem this afternoon.
May be a relevant issue: https://github.com/adzerk-oss/boot-reload/issues/121
@luke fixed it here: https://github.com/jcf/usr/commit/8281da793b18a95aa3bfcdb1b9a2c76f631b2576
Looks like something's been fixed in a recent release of Figwheel (I read that load
was replaced with safeLoad
but haven't dug deeper).
Upgrading Figwheel fixed the problem with jsloader.load
not being around but now I get this:
THen clicking the error spits out this:
heads_up.cljs?rel=1516991443932:39 Uncaught TypeError: Cannot read property 'figwheelEvent' of undefined
at heads_up.cljs?rel=1516991443932:39
at core.cljs:4353
at cljs.core.keep.cljs$core$IFn$_invoke$arity$2 (core.cljs:4353)
at cljs.core.LazySeq.sval (core.cljs:3380)
at cljs.core.LazySeq.cljs$core$ISeqable$_seq$arity$1 (core.cljs:3438)
at cljs.core.LazySeq.cljs$core$ISeq$_first$arity$1 (core.cljs:3404)
at cljs$core$first (core.cljs:1220)
at figwheel$client$heads_up$get_dataset (heads_up.cljs?rel=1516991443932:39)
at HTMLDivElement.figwheel$client$heads_up$heads_up_onclick_handler (heads_up.cljs?rel=1516991443932:43)
If I change the string in my views/Layout
a few times I can reliably max out the open file limit.
I have a rule that says if A is true then insert-logical B. And, at first, one event-handler inserts the fact that A is true, so B gets inserted. Now, in another event-handler, I want to either set A to false or retract A, so that B can automatically be retracted.
@jcf ok, let me get my head around the open files issue. that came up on another project a couple months ago and we found a workaround, I’ll refresh my memory on that end get back to you.
You should be able to reproduce the too many open files issue using my usr
repo. If you trigger a reload by changing a cljs file a few times it pops up.
I vauguely remember reloading the system via reset
from the user
ns contributed but can’t find an example right now.
I’m planning on doing some more work with Arachne and will likely open source most if not all of what I achieve. If you have a roadmap or want to collaborate on something let me know. Thanks, Luke! Catch you later.
glad you’re finding Arachne interesting, eager to see what you do with it. Let me know if there’s anything else I can do to help
@amarjeet that should work already if the fact is cardinality one; it will be replaced and the logical rule effect will happen
if it’s cardinality many then the old fact is still true as well, so nothing will be retracted
oh okay, I wasn't setting the cardinality option. I just used (f/transact-logical! [{:db/ui true}])
@jcf ok I actually fixed a similar issue a while back: https://github.com/arachne-framework/arachne-fileset/commit/8893b28ad1adfe2a4c9bf0a32a27b6c483004cd5#diff-81355e05491a6b7a3ef3d7f8e1bc3d5e
what version of arachne-fileset is your project using? (you can check this using lein deps :tree
or something like that
@luke https://github.com/jcf/usr/blob/master/deps.edn gets slurped into project.clj
. I’ll copy and paste the version now…
@jcf right: the arachne-fileset lib is a transitive dependency of the Arachne assets module
for now you can just manually include the newest version of org.arachne-framework/arachne-fileset