This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-19
Channels
- # 100-days-of-code (5)
- # announcements (1)
- # aws (1)
- # beginners (112)
- # cider (135)
- # cljdoc (6)
- # clojure (111)
- # clojure-dev (8)
- # clojure-italy (3)
- # clojure-nl (5)
- # clojure-sweden (3)
- # clojure-uk (152)
- # clojurescript (101)
- # datascript (14)
- # datomic (61)
- # editors (1)
- # emacs (29)
- # events (7)
- # figwheel (3)
- # figwheel-main (15)
- # fulcro (18)
- # funcool (2)
- # graphql (1)
- # juxt (2)
- # off-topic (51)
- # om (1)
- # overtone (28)
- # perun (2)
- # reagent (1)
- # reitit (6)
- # ring-swagger (5)
- # shadow-cljs (112)
- # spacemacs (49)
- # tools-deps (10)
- # unrepl (11)
- # yada (10)
I’m thinking hard about the caching provided by shadow and how to avoid wrecking it with my ideal stack. Just curious whether FactUI breaks caching due to being based on Clara. https://github.com/arachne-framework/factui
@grounded_sage yeah clara-rules
is not very cache friendly. IIRC the problematic part of fact-ui is the f/rulebase
call
@richiardiandrea the threadpool was Terminated
? did you ctrl+c or something? normally a watch
never terminates the threadpool? not even when the watch
is stopped since its shared on the entire system (only stop!
does that)
Sorry, it's a re-frame thing https://github.com/Day8/re-frame-debux/issues/22
@thheller just gotta say, the repl fix that uses the current code NS is awesome! much better experience, and with your tips to remove warnings and the latest shadow my compilation times got down from 15s (for file with lots of dependants) to 3s!! awesome!!
for future reference: if anyone is seeing regular watch
recompile times of 10sec+ please let me know. there is probably something to be improved just waiting to be found! do not assume that 10s+ is normal
the change was for Cursive only I think. not sure emacs actually sends the :ns
when evaling from a file
the behaviour in Cursive is that it uses the namespace of a file when you send a form from a file to the REPL
my emacs setup is completely busted so I have no idea if emacs actually sends :ns
or not
Had this problem agian in CI:
[2018-10-19 19:41:40.023 - INFO] :shadow.build.classpath/jar-cache-read-ex - {:file #object[java.io.File 0x1f0f5174 ".shadow-cljs/jar-manifest/1539977882000-core.rrb-vector-0.0.12.jar.manifest"]}
RuntimeException java.io.EOFException
com.cognitect.transit.impl.ReaderFactory$ReaderImpl.read (ReaderFactory.java:114)
cognitect.transit/read (transit.clj:319)
cognitect.transit/read (transit.clj:315)
shadow.build.cache/read-cache (cache.clj:49)
shadow.build.cache/read-cache (cache.clj:33)
shadow.build.classpath/find-jar-resources/fn--11757 (classpath.clj:565)
… cognitect.transit/read (transit.clj:319)
I'm using 2.6.10 and getting very intermittent errors when doing a release build in CI:
aborted par-compile, [:shadow.build.classpath/resource "clojure/string.cljs"] still waiting for #{cljs.core}
{:aborted [:shadow.build.classpath/resource "clojure/string.cljs"], :pending #{cljs.core}}
ExceptionInfo: aborted par-compile, [:shadow.build.classpath/resource "clojure/string.cljs"] still waiting for #{cljs.core}
clojure.core/ex-info (core.clj:4739)
clojure.core/ex-info (core.clj:4739)
shadow.build.compiler/par-compile-one (compiler.clj:760)
shadow.build.compiler/par-compile-one (compiler.clj:729)
shadow.build.compiler/par-compile-cljs-sources/fn--12969/iter--12970--12974/fn--12975/fn--12976/fn--12977 (compiler.clj:822)
clojure.core/apply (core.clj:657)
clojure.core/with-bindings* (core.clj:1965)
clojure.core/with-bindings* (core.clj:1965)
clojure.core/apply (core.clj:661)
clojure.core/bound-fn*/fn--5471 (core.clj:1995)
java.util.concurrent.FutureTask.run (FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
java.lang.Thread.run (Thread.java:748)
might this be fixed by some of the changes to parallel compilation that I see since 2.6.10? It's hard for me to test since it only happens intermittently
I've tried manually specifying :optimizations :advanced
, :infer-externs :auto
and :shadow-keywords true
, and still, a release build looks like this:
(not sure if the image uploaded correctly, as slackbot is saying something about no storage left)
basically: #1, a curious unminified polyfill always shows up, and #2 plenty of full names visible in code
if I include reagent and re-frame, I get ~300k of release bundle; I tried adding a button and textfield component from material-ui, and the bundle size shoots up to 600k +
I thought so, but then I stumbled upon some issues about material-ui bundle size, and people apparently expect a release bundle to be ~100-300k max
@temporal.pl run this to get a details breakdown of all the stuff in your build https://shadow-cljs.github.io/docs/UsersGuide.html#_build_report
@temporal.pl use things like (:require ["@material-ui/core/Button" ...])
to only include parts of the package
yes, this case uses only
["@material-ui/core/Button" :default muiButton]
["@material-ui/core/TextField" :default muiTextField]
for teststill; it's a fresh project, and I'm not married to any UI library yet, so if I could ask you for recommendation?
@lilactown thats a bad closure compiler version
not a fan that closure keeps changes their public interfaces. they don't seem to care much about backwards compatibility 😞
well to be fair that interface wasn't public and I had to cheat to get access to it 😛
one release build works fine, but concurrent ones:
npx shadow-cljs release server client dev-client
hmm don't scare me like that ... I actually changed how parallel compile works. don't tell me I actually broke it?
in the past, re-running the build has resolved it, but it was popping up relatively often
thats definitely not normal and should never actually happen. its just a safeguard so the process doesn't wait forever
if the other 2 builds proceed normally the third may just not be getting a chance to run before its timeout
the way this works is that all builds more or less start at the same time and enqueue all the CLJS compiles onto a threadpool
I'm wondering if a particular EC2 gets used for multiple concurrent builds if it's what causes the error
definitely try running with verbose AND running them after each other instead of parallel
alright, I wrote a simple script to do the build:
(ns release
(:require [shadow.cljs.devtools.server :as server]
[shadow.cljs.devtools.api :as shadow]))
(defn -main [& args]
(server/start!)
(shadow/release :server {:verbose true})
(shadow/release :client {:verbose true})
(shadow/release :dev-client {:verbose true})
(server/stop!)
(System/exit 0))
I'll report back if I see those errors again