Fork me on GitHub
#shadow-cljs
<
2020-07-30
>
dehli01:07:53

With it being a nodejs app I don’t really need to have advanced optimization since bundle size isn’t a big deal (unless there’s some other benefit I’m unaware of).

orestis07:07:13

I have a potentially weird request: can I just run an analysis over my .cljs code that will do macroexpansion but nothing else? We’re yet again trying to do translation extraction based on macros. We don’t care to generate JS code at all, just go over all of our source code (with no cache), macroexpand, then look at at some dynamic var that contains all our translation strings.

thheller08:07:03

@dehli there is no watch for release builds. you can run shadow-cljs server and then shadow-cljs release app whenever you want to rebuild. it'll be quick, just need to trigger it manually. or just use an external watcher to trigger that command. I recommend doing it manually since release optimizations can take a long time you usually end up compiling "prematurely" and then having another compile queue up.

thheller08:07:32

don't quite see a reason why you want watch with :simple though? whats wrong with just watch?

dehli11:07:23

thanks! the artifact produced with watch seems to require some dependencies (such as websocket). My idea of using watch with a simple build is that I could have that running and as I make changes I could very quickly deploy the updated code to AWS.

dehli12:07:37

Hi, I think I’ve found a performance bug with shadow and was wondering if anyone has seen something like it before. Calling (map js/JSON.parse (string/split-lines x)) takes approximately 10 seconds to run with an 7mb file on my local machine however running the equivalent with Javascript (using js/eval) is less than a second. The reason I think this is a shadow bug and not Cljs is that we’ve recently started to have our functions that do this timeout and it’s lining up with when we switched to shadow. I think it’s specifically the split-lines command that is taking much longer. I am using the latest version of shadow. My next step is going to make a minimal reproducible examples showcasing the differences between shadow, clj, and raw nodejs. Edit: Looks like it’s not unique to Shadow. I’m seeing the same performance differences w/ a regular Clojure repl. I guess it’s a coincidence that the bugs started showing up around the same time. Sorry about that!

ddellacosta16:07:30

Hi folks, apologies if this is common knowledge but I’m trying to start a cider repl via cider-jack-in-cljs (per https://shadow-cljs.github.io/docs/UsersGuide.html#cider). I’m never given the option to choose a build, instead apparently it tries to create one, and this fails since I’ve already got a shadow-cljs server running. I’ll note that I’ve also got a .dir-locals.el set up per the cider instructions but this seems to be getting ignored. On the other hand it seems like I can connect to the shadow-cljs server just fine by using cider-connect-cljs instead. It’s obviously not a problem since I’ve got it working, but it’s very much not what is in the reference either for shadow-cljs or cider. I will also note that I’m using lein for dependencies instead of the default--could this be causing this? Anyways, just curious, not a big deal since it seems like I’m up in running now.

thheller16:07:38

maybe better to ask in #cider. I don't use emacs so I don't know anything about this.

👍 1