You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, re-frame and reagent are the only sources of trace. How about we allow the application programmer to produce their own trace, and have it folded into the stream for later inspection.
Hmm. Strictly speaking this is a re-frame issue more than a re-frame-trace issue, I think, but it makes sense to track it here.
Perhaps have tracing macro utilities which make it even easier for programmers to produce trace.
As an example, consider this dlet macro:
;; From e.g. https://github.com/scottjad/uteal
(defmacro dlet
"let with inspected bindings"
[bindings & body]
`(let [~@(mapcat (fn [[n v]]
(if (or (vector? n) (map? n))
[n v]
[n v '_ `(println (name '~n) ":" ~v)]))
(partition 2 bindings))]
~@body))
which allows use like:
(dlet [a (something :a) ;; note use of `dlet` instead of `let`
b (f "hello")]
... )
Now imagine that dlet produced trace instead of using println . And imagine that the trace is recorded against the event handler (or subscription) in which this dlet was used. Maybe call it tlet for trace let.
The text was updated successfully, but these errors were encountered:
At the moment, re-frame and reagent are the only sources of trace. How about we allow the application programmer to produce their own trace, and have it folded into the stream for later inspection.
Hmm. Strictly speaking this is a
re-frame
issue more than are-frame-trace
issue, I think, but it makes sense to track it here.Perhaps have tracing macro utilities which make it even easier for programmers to produce trace.
As an example, consider this
dlet
macro:which allows use like:
Now imagine that
dlet
producedtrace
instead of usingprintln
. And imagine that the trace is recorded against the event handler (or subscription) in which thisdlet
was used. Maybe call ittlet
for trace let.The text was updated successfully, but these errors were encountered: