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
the basilisp.core/time macro uses a straight start let binding referenced in a try-catch block and as such is susceptible to errors when expanded by macroexpand-all (see #1142)
To reproduce
In the REPL create use time in a new macro definition and try to expand it with macroexpand-all, an error is thrown complaining about the start binding:
basilisp.user=> (require '[basilisp.walk :refer [macroexpand-all]])
nil
basilisp.user=> (defmacroabc [] `(time 5))
#'basilisp.user/abc
basilisp.user=> (macroexpand-all '(abc))
exception: <class 'basilisp.lang.compiler.exception.CompilerException'>
phase: :analyzing
message: unable to resolve symbol 'basilisp.core/start' in this context
form: basilisp.core/start
location: <Macroexpand>:NO_SOURCE_LINE
I believe the intention here was to use an auto-gensym all along.
Patch to follow.
Thanks
The text was updated successfully, but these errors were encountered:
Hi,
could you please consider patch to use an auto-gensym for the let
binding in the `time` macro. It addresses #1143.
I assumed here that a straight let binding was used inadvertently rather
than an auto-gensym.
No tests were included due to the simplicity of the fix.
Thanks
Co-authored-by: ikappaki <ikappaki@users.noreply.github.com>
Hi,
the
basilisp.core/time
macro uses a straightstart
let binding referenced in a try-catch block and as such is susceptible to errors when expanded bymacroexpand-all
(see #1142)To reproduce
time
in a new macro definition and try to expand it withmacroexpand-all
, an error is thrown complaining about thestart
binding:I believe the intention here was to use an auto-gensym all along.
Patch to follow.
Thanks
The text was updated successfully, but these errors were encountered: