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
I don't have an clear idea on how to best fix this. If there was a way to detect & remove gensym'd symbols, that would be ideal. I don't know think that's possible at all.
The anonymous function syntax seems likely to be the most common (only? is this something that can only happen from syntax, or could a macro cause it too?) cause of this and it will always end its binding with #, or you could pick up on the prefix of p\d+__ for that case, too.
The text was updated successfully, but these errors were encountered:
I haven't tested this, but since it's the defnc macro that does the fast-refresh detection, I think this is only a problem for things that gensym new bindings in the reader. E.g. if you have a macro that gensyms some binding,
The code used by defnc will be the non-macro-expanded forms. It's only because the anonymous function syntax expansion happens in the reader that this is a problem. I think.
Simple reproduction that will cause fast refresh to always do a full reload:
It will be fixed by using
(fn [%] (identity %))
instead. The problem is that on each reload the gensym'd binding that replaces%
is changed. Compare:I don't have an clear idea on how to best fix this. If there was a way to detect & remove gensym'd symbols, that would be ideal. I don't know think that's possible at all.
The anonymous function syntax seems likely to be the most common (only? is this something that can only happen from syntax, or could a macro cause it too?) cause of this and it will always end its binding with
#
, or you could pick up on the prefix ofp\d+__
for that case, too.The text was updated successfully, but these errors were encountered: