This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-30
Channels
- # admin-announcements (3)
- # aws-lambda (12)
- # beginners (88)
- # boot (73)
- # capetown (6)
- # carry (16)
- # cider (8)
- # cljsjs (7)
- # clojure (90)
- # clojure-belgium (4)
- # clojure-dev (19)
- # clojure-greece (41)
- # clojure-portugal (1)
- # clojure-quebec (4)
- # clojure-russia (25)
- # clojure-spec (172)
- # clojure-taiwan (1)
- # clojure-uk (76)
- # clojurescript (82)
- # cursive (37)
- # datavis (2)
- # datomic (46)
- # devcards (1)
- # emacs (4)
- # euroclojure (6)
- # events (1)
- # hoplon (31)
- # jobs (1)
- # keechma (9)
- # off-topic (4)
- # om (7)
- # onyx (65)
- # other-languages (15)
- # pedestal (1)
- # planck (50)
- # proton (1)
- # re-frame (40)
- # reagent (7)
- # spacemacs (14)
- # spirituality-ethics (37)
- # testing (1)
- # untangled (2)
- # yada (44)
So the atom-sync
middleware can also be used for resetting the model from the REPL, right?
@metametadata: another improvement that came to mind: it would be nice if you could give a white/blacklist of keywords to the logging middleware. I really don't want it to log what happens in the debugger 🙂
yes, for REPL you'll have to create your own external "model atom" and connect it with the app via the middleware, smt like this:
(def repl-model (atom (:initial-model my-spec))
(def my-app (carry/app (-> my-spec (atom-sync/add repl-model))))
; ...
then after app is started repl-model
will behave as if it was a model atom.To fix logging try changing the order of applying logging
and debugger
middleware.
If applied last, logging
middleware will catch all the signals:
(-> spec ... (debugger/add ...) logging/add)
And this way logger won't see debugger's signals and actions, because they don't propagate into the debugged app:
(-> spec ... logging/add (debugger/add ...))
Though I was thinking that one good way to develop an app with carry would be that you define a plumatic schema for your whole model, and clojure.specs for individual functions
OK I'll prob add this into faq or user guide
I haven't digged into core.spec yet
@kauko: carry-atom-sync
middleware is extracted and there's an example of using it with Devcards/Reagent in counter-devcards
. Doc updates are on the way.