-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow 3rd party trace #149
Labels
Comments
Maybe this could be a single tap handler that observes re-frame's state. Any macros would simply wrap parts of your code with To record not just an evaluation, but the literal form as well, is a cool idea. I think shadow-cljs does that. (defmacro tlet
"let with tapped bindings"
[bindings & body]
`(let [~@(mapcat (fn [[n v]]
(if (or (vector? n) (map? n))
[n v]
[n v '_ `(tap> [(name '~n) ~v)]]))
(partition 2 bindings))]
~@body)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: