-
-
Couldn't load subscription status.
- Fork 6
Description
Hi, I'm loving the design of this library. I'm in the progress of integrating it within my app, and am having some strange issue under advanced closure optimizations.
I'm not too familiar with web workers: this is the first time I'm using them.
Let me explain my situation:
I have two separate builds: one for my main app code, the other for my web worker code.
This file calls my worker: https://github.com/sp3ctum/squanmate/blob/feature/cubeshape-trainer/src/squanmate/solving.cljs
The worker itself is here: https://github.com/sp3ctum/squanmate/blob/feature/cubeshape-trainer/webworkers_src/workers/solver.cljs
Under :optimizations :none the worker works perfectly. But under :optimizations :advanced I get this error:
webworkers.js:7104 TypeError: Cannot read property '$cljs$core$IFn$_invoke$arity$1$' of null at self.onmessage (webworkers.js:7032)
If I use the chrome debugger to look at that error, it seems like this line might be the culprit: https://github.com/jtkDvlp/cljs-workers/blob/master/src/cljs_workers/worker.cljs#L48
It looks like in the optimized code the (@handlers (keyword (.-handler data))) code has changed the .-handler property access to something like .$handler39$.
I've never seen anything like this, so I'm a bit baffled. Would you have some sort of recommendation?