Fork me on GitHub
#shadow-cljs
<
2018-06-11
>
momoblackblack16:06:03

@thheller Thanks for the suggestion on getting react virtualized working. It was missing clj->js.

spieden17:06:43

that still bites me from time to time. with react stuff i seem to end up needing it sometimes and others not

lee.justin.m18:06:08

@spieden it probably feels that way because a bunch of the reagent adapters call the converter functions for you, but with callback heavy libraries like react virtualized, you interface directly with the library and you tend to need to deal with marshaling directly

bfast19:06:07

is there a write-up anywhere of how shadow-cljs does NPM modules better than the normal cljs compiler?

lee.justin.m20:06:50

you might just check out the table at the end for the tldr

richiardiandrea23:06:49

I have a strange error that I have never seen before: I have two different :node-library built with shadow and I try to require them in node:

> var h1 = require ("./init-store")
...a bunch of SHADOW load...
> var h2 = require ("./query-events")

richiardiandrea23:06:59

but the second require throws

richiardiandrea23:06:03

SHADOW import error /home/arichiardi/git/laputa/lambda-cqrs/query-events/cljs-runtime/cljs.spec.alpha.js
Error: No protocol method ISwap.-swap! defined for type cljs.core/Atom: [object Object]
    at SHADOW_IMPORT_PATH (/home/arichiardi/git/laputa/lambda-cqrs/query-events/index.js:5:26)
    at /home/arichiardi/git/laputa/lambda-cqrs/query-events/index.js:3033:1
    at global.SHADOW_IMPORT (/home/arichiardi/git/laputa/lambda-cqrs/query-events/index.js:65:44)
    at /home/arichiardi/git/laputa/lambda-cqrs/query-events/cljs-runtime/cljs/spec/alpha.cljs:1334:1
    at Object.cljs$spec$alpha$def_impl [as def_impl] (/home/arichiardi/git/laputa/lambda-cqrs/query-events/cljs-runtime/cljs/spec/alpha.cljs:297:3)
    at Function.cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4 (/home/arichiardi/git/laputa/lambda-cqrs/query-events/cljs-runtime/cljs/core.cljs:4470:7)
    at Function.cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$4 (/home/arichiardi/git/laputa/lambda-cqrs/query-events/cljs-runtime/cljs/core.cljs:854:1)
    at Object.cljs$core$missing_protocol [as missing_protocol] (/home/arichiardi/git/laputa/lambda-cqrs/query-events/cljs-runtime/cljs/core.cljs:312:3)
> 

richiardiandrea23:06:12

has anyone seen this error?

richiardiandrea23:06:31

it looks like some global state there gets in the way

richiardiandrea23:06:32

will open an issue