Fork me on GitHub
#shadow-cljs
<
2019-07-10
>
martinklepsch11:07:21

has anyone seen this exception before?

thheller11:07:20

@martinklepsch looks to me like (shutdown-agents) was called maybe?

thheller11:07:53

$ clj
Clojure 1.10.1
user=> (shutdown-agents)
nil
user=> (future 1)
Execution error (RejectedExecutionException) at java.util.concurrent.ThreadPoolExecutor$AbortPolicy/rejectedExecution (ThreadPoolExecutor.java:2055).
Task java.util.concurrent.FutureTask@4f63e3c7[Not completed, task = clojure.core$binding_conveyor_fn$fn__5754@3eee3e2b] rejected from java.util.concurrent.ThreadPoolExecutor@59532566[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
user=>

martinklepsch11:07:35

yeah that would make sense but the only places where I can find shutdown-agents are not being ran… will investigate a bit further 🙂

martinklepsch16:07:30

turned out some code changed and we were calling shutdown agents 🙂

martinklepsch11:07:48

just wanted to check if anyone is like “ah yeah, that’s that!”

thheller11:07:05

its definitely not shadow-cljs doing that

aisamu14:07:59

Hi! Related to this issue reported on #cljs-dev (https://clojurians.slack.com/archives/C07UQ678E/p1562770098327500), I'd just like to add that shadow-cljs seems to swallow the NPE (but unfortunately still emits invalid JS):

goog.provide('cljsbug.wat.shadow.core');
goog.require('cljs.core');
cljsbug.wat.shadow.core.a = cljs.core.rand_nth(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [null], null));
if(cljs.core.truth_(cljsbug.wat.shadow.core.a)){
( * (2));
} else {
}

thheller16:07:25

that one is probably fixed in CLJS master. forgot what the ticket issue was but it was a compiler bug

🎉 4
aisamu01:07:44

Confirmed that it works! Thanks!