This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-05
Channels
- # announcements (8)
- # babashka (6)
- # beginners (55)
- # biff (8)
- # calva (11)
- # cider (4)
- # clj-kondo (6)
- # cljdoc (23)
- # cljs-dev (22)
- # clojure (89)
- # clojure-brasil (3)
- # clojure-europe (47)
- # clojure-indonesia (1)
- # clojure-nl (1)
- # clojure-spec (3)
- # clojure-uk (5)
- # clojurescript (67)
- # community-development (2)
- # conjure (29)
- # cursive (2)
- # datalog (29)
- # datomic (41)
- # defnpodcast (4)
- # emacs (15)
- # google-cloud (5)
- # holy-lambda (6)
- # hyperfiddle (3)
- # introduce-yourself (8)
- # jobs (1)
- # malli (19)
- # meander (41)
- # nrepl (1)
- # off-topic (30)
- # pathom (22)
- # polylith (30)
- # releases (1)
- # remote-jobs (4)
- # sci (4)
- # shadow-cljs (1)
- # spacemacs (7)
- # specter (3)
- # tools-build (16)
- # tools-deps (2)
Hi there, is there a minimal sample project using Malli instrumentation (during dev) in a shadow-cljs webapp? Or is there a recommended configuration for http://malli.dev in cljs? I'm struggling a bit to setup it well. -> thread for more info
With a basic configuration I got:
with thrower i got:
the implementation of that is under active development - if you can use the latest git commit you'll have better errors
this thread has some background, I suggest adding this metadata to your entry ns: https://github.com/metosin/malli/issues/695#issuecomment-1116884390
> you'll have better errors The error seems pretty good rn, it's just a problem of formatting them inside the console/devtools I'm looking for your link to see if it can improve something
With the master version of pretty/reporter, there's a reader conditional for cljs and it now prints well, thanks! I'll see if I have hot reload issue like your link
nice! yea it's tricky because instrument outputs code where it is called that overwrites the fn - so if you're iterating on the implementation of the the fn in a separate namespace they can get out of sync
I was using dev/start! but I had to use instrument! instead. I think I don't need the {:dev/always true} metadata, it seems to just work fine without it (I call instrument! every time the app is hot reloaded).
You'll run into staleness issues described in the ticket without reloading the ns where instrument is called
I tried to update both the function and the spec and it seems to work well
I didn't even thank you… so thanks!
for sure! no prob - thanks for trying it out! the leverage from malli is pretty remarkable, just helping to add to that power 🙂
I think I've just had some issues that has been solved with {:dev/always true}
Reloading the webapp was doing nothing, I had to restart my shadow-cljs watch. And with the workaround above it seems to work.