Fork me on GitHub
#shadow-cljs
<
2020-12-22
>
AJ Jaro01:12:54

yep, that makes sense it’ll recompile, but from my experience that high CPU usage can sometimes continue for quite a while even after the build is completed.

royalaid02:12:57

Hey @thheller I have been playing around with https://github.com/jpmonettas/flow-storm and when I tried to wire it up from node.js output I ran up against an issue with how to include the ws npm package.

royalaid02:12:30

Because flow-storm leverages sente I figured I would look there

royalaid02:12:56

and https://github.com/ptaoussanis/sente/blob/master/src/taoensso/sente.cljc#L1062-L1064 seems to be the root of the issue, if I :require "ws" it isn't in a spot where sente expects

royalaid02:12:06

what is the recommended way to solve this?

royalaid02:12:04

Should I monkey patch the goog/global obj (this what I am planning right now), should I issue some kind of PR to sente, or does Shadow have some cool workaround in the config I can setup?

royalaid02:12:12

Maybe something else?

thheller10:12:42

@royalaid from what I can tell it expects the node websocket package, not ws? it certainly tries to hide that require as much as possible 😛

royalaid16:12:32

@thheller I think it is so that it works around some react native stuff, and ws is the npm websocket package complicating this all the more 😂

thheller16:12:28

I do understand why they do this hack. I do not understand why you are talking about the ws package. there is an actual websocket package they expect. at no point do I see any reference to ws?

royalaid21:12:57

Ya know, upon reflection I think you might be on to something. I may have been conflating the two this whole time.

thheller23:12:54

shadow-cljs actually uses the ws package for node so you'll need both but as far as sente is concerned that expects websocket