Fork me on GitHub
#carry
<
2016-06-30
>
kauko03:06:59

looks good!

kauko03:06:16

So the atom-sync middleware can also be used for resetting the model from the REPL, right?

kauko05:06:23

@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 🙂

kauko05:06:42

I guess this is a minor issue though, but still

metametadata06:06:13

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.

metametadata06:06:52

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 ...))

kauko07:06:55

should document that

kauko07:06:34

any plans on adding a spec middleware btw?

kauko07:06:18

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

metametadata07:06:57

OK I'll prob add this into faq or user guide

metametadata07:06:12

I haven't digged into core.spec yet

metametadata12:06:49

@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.

kauko14:06:17

wohoo 🙂