telemere/projects/main
Peter Taoussanis cbab57be66 [fix] [#21] Work around issue with use in Cljs core.async/go bodies
Problem:
  (clojure.core.async/go (taoensso.telemere/log! "hello")) ; Compiles fine
  (cljs.core.async/go    (taoensso.telemere/log! "hello")) ; Compile fails

I could try to get to the bottom of exactly what's going on - but ultimately
IOC mechanisms like `go` are always going to be a bit fragile, especially for
heavily-optimized/unusual code.

In this case, the problem is thankfully only with Cljs - and Telemere's Cljs
performance isn't too critical - so I think we can afford to just bypass any
potential fiddling by the `go` macro by wrapping Cljs Telemere expansions in
an IIFE ((fn [] ...)).

Downside is the (small) added cost of a function construction and call.
Upside   is avoiding potential issues with core.async and other similar
IOC-style systems (Electric Clojure, etc.)
2024-09-20 22:55:12 +02:00
..
bb [nop] Restructure repo 2024-08-28 16:53:31 +02:00
public [nop] Restructure repo 2024-08-28 16:53:31 +02:00
resources/signal-docstrings [new] Add :rate-limit-by option to all signal creators 2024-09-20 22:55:12 +02:00
src/taoensso [fix] [#21] Work around issue with use in Cljs core.async/go bodies 2024-09-20 22:55:12 +02:00
test/taoensso [fix] [#21] Work around issue with use in Cljs core.async/go bodies 2024-09-20 22:55:12 +02:00
.gitignore [nop] Restructure repo 2024-08-28 16:53:31 +02:00
bb.edn [nop] Restructure repo 2024-08-28 16:53:31 +02:00
jaeger.sh [nop] Restructure repo 2024-08-28 16:53:31 +02:00
project.clj [fix] [#21] Work around issue with use in Cljs core.async/go bodies 2024-09-20 22:55:12 +02:00
shadow-cljs.edn [nop] Restructure repo 2024-08-28 16:53:31 +02:00
shadow-cljs.sh [nop] Restructure repo 2024-08-28 16:53:31 +02:00