Fork me on GitHub
#calva
<
2022-07-02
>
john20:07:43

I'm trying to figure out a common webworker usage patter across all the different build tools (cljs.main, figwheel and shadow) and for cljs.main, I can't figure out how to get calva's deps.edn + Clojurescript built-in for Browser option to pick up a build.edn file, per this example here: https://github.com/kommen/clojurescript-webworker-demo The recommendation there is to do:

clj build.clj
clj -M -m cljs.main --serve localhost:7777
I've tried setting up a custom replConnectSequence with: (do (require 'cljs.repl.browser) (cider.piggieback/cljs-repl (cljs.repl.browser/repl-env) :target :webworker)) As well as: (do (require 'cljs.repl.browser) (require '[cljs.build.api :as api]) (api/build \"src \" {:output-dir \"out/ \" :target :webworker}) (cider.piggieback/cljs-repl (cljs.repl.browser/repl-env) :target :webworker)) With no luck so far. Has anyone tried passing custom compiler options to in Calva for the built-in CLJS repl?

🧵 2
john20:07:05

Correction, that example project advises to run the build.clj which has compiler options passed to the build fn. But I'm wondering if it's possible to pass the options in somehow to the repl-env in the repl connect sequence

john20:07:33

Hmm, yeah, seems like there's some regression in cljs.main where you have to use cljs.build.api/build atm, so clj -M -m cljs.main -v -co build.edn -c -s doesn't work currently in that example project. I am however able to spawn a webworker programmatically though, after the artifact is built and loaded on the main thread, using a static loader file to pull in the deps.

Jacob Rosenzweig21:07:52

Is there any reason why the calva terminal in a WSL Remote won't log anything after my server starts up? Either it's an extension issue with WSL Remote or a logger problem

🧵 1
Jacob Rosenzweig05:07:08

It ended up being something with the logger itself. Remote mode is awesome!

phill10:07:47

It is awesome. And it comes at the right time, what with the days being numbered of the X-remoting via ssh that's typical of Linux.

Jacob Rosenzweig21:07:10

I don't use dev containers btw. Just my WSL Ubuntu default