Closed aiba closed 2 months ago
@aiba Hi Aaron, thanks for the report! I'll need to investigate what go
is doing that might be causing trouble.
What's the urgency on this? Could a fix wait till next week sometime?
Not urgent. For now, I can just wrap log! in a regular function, since go macros don't analyze across function boundaries.
Okay, thanks!
BTW in case it's not obvious, you may literally be able to do something like ((fn [] (tel/log! "hello")))
within your go
block. (Not sure if that's what you already had in mind, or if you were talking about moving your log calls into a fn that you def outside your go
block).
I'll keep this open till I've investigated and found a solution 👍
Update: fix (a reasonable workaround) is up on master, and available now as a 1.0.0-SNAPSHOT.
Basically just auto-wrapping Cljs expansions with ((fn [] ...))
to avoid fiddling by go
and other similar IOC-style mechanisms.
Will keep this issue open until beta 23 is released (ETA next week).
Oh wow that's a nifty trick I hadn't thought of for go blocks, thank you for that! That's going to be useful to have in many situations.
Closing since this is now addressed in the latest betas 👍
Compiling this code in ClojureScript fails with
"ExceptionInfo Can't call nil"
:I'm guessing this has something to do with the way the
log!
macro expands and then thego
macro analyzes the expanded code.On JVM clojure, it works fine. Is there a way to get it to also work in ClojureScript?