This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-03
Channels
- # announcements (1)
- # babashka (31)
- # bangalore-clj (3)
- # beginners (18)
- # bitcoin (2)
- # calva (14)
- # clj-kondo (37)
- # clojure (43)
- # clojure-europe (4)
- # clojurescript (24)
- # data-science (4)
- # datahike (1)
- # datascript (3)
- # datomic (1)
- # fulcro (16)
- # lsp (13)
- # malli (1)
- # meander (7)
- # off-topic (1)
- # polylith (12)
- # re-frame (7)
- # reitit (1)
- # rewrite-clj (46)
- # rum (4)
- # shadow-cljs (15)
- # specter (3)
- # sql (55)
- # tools-deps (20)
Do you ever get out of memory exceptions when running generative tests on node?
I am noticing more and more that a generative test than is quite all right on the JVM (eg. runs in 20 seconds without any memory adjustment) becomes really bloated when run on node (eg. now takes several minutes and explicitly needs more memory with --max_old_space_size
)
@nilern @thheller Hello š I went through quickstart guide - https://github.com/thheller/shadow-cljs#quick-start as mentioned. But admittedly I am not too sure where I should continue from there š , do y'all have any suggestions? If not no worries, I'll try to figure something out!
what in particular are you looking to do? I mean did you chose a libray/framework yet or do you just want to test a few things?
Hmmm, I have a good idea of what libraries I am planning to use already. Have been thinking reagent
with re-frame
for stability (building a final year project for a company) and most examples/references. I considered rum
after looking at it for awhile but seems like both are similarly stable and it wouldn't make a huge difference/benefit to go to rum
instead
Am specifically building a frontend interface to input constraints (be it check-boxes or sliders) and based on that state, send it as a query to the clojure backend
or maybe use the re-frame template and compare what it generated vs. the raw setup you have now
As Iāve worked on my small reagent/shadow-cljs side-project, Iāve noticed the split between my repl and my actual app more and more, especially while debugging. The repl is fine for testing functions in isolation, but being able to inspect my appās state (without resorting to prn debugging) would be really nice. Is there a (reasonable) way to connect a repl to an actual app? Or would that take me far off the beaten path?
Also, you can (tap> value)
https://clojuredocs.org/clojure.core/tap%3Eand view the data in the shadow-cljs inspector (http://localhost:9630/inspect) which really helps as your app state starts to grow.
@max.r.rothman pretty much all targets support a REPL? how are you using the REPL now?
shadow-cljs watch app
and then separately shadow-cljs cljs-repl app
would give you a REPL into the app
build for example
Iāve got this in my shadow-cljs.edn
:
:dev-http {8080 "public"}
:builds
{:frontend {:target :browser
:modules {:main {:init-fn myapp.main/init}}}}
I typically launch a repl using Calva, which appears to be running this command:
npx shadow-cljs -d cider/cider-nrepl:0.25.8 watch :frontend
After it completes the build, it asks me which repl to start, giving me an option between node, browser, and my build. Selecting ābrowserā open a tab that says āCode entered in a browser-repl prompt will be evaluated here.ā.
Iām very much new to cljs, and definitely donāt understand how all the pieces fit together yet, so I really appreciate the help!I hadnāt been using that because when I try, my repl says āNo available JS runtimeā and links to a troubleshooting doc. I read through the doc and didnāt see anything that seemed relevant (to my newbie eyes), figured I had done something wrong, and went back to the plain browser option