This is a BREAKING change to get in before v1 final.
Signal keys BEFORE this commit:
`:location` ---- ?{:keys [ns file line column]} signal creator callsite
`:ns` ---------- ?str namespace of signal creator callsite, same as (:ns location)
`:line` -------- ?int line of signal creator callsite, same as (:line location)
`:column` ------ ?int column of signal creator callsite, same as (:column location)
`:file` -------- ?str filename of signal creator callsite, same as (:file location)
Signal keys AFTER this commit:
`:ns` ---------- ?str namespace of signal creator callsite
`:coords` ------ ?[line column] of signal creator callsite
Motivation for the breaking change:
The new callsite schema is simpler to use/override, reduces noise, and can reduce
code expansion size (and so Cljs build size).
- `:file` was rarely useful, but often added large embedded strings.
- `:location` was redundant, and often difficult for Closure's
advanced build to properly de-duplicate.
This schema will be shared by Truss v2 and Tufte v3.
- Simplified some util name (only relevant to folks customizing handler behaviour)
- Merged `format-signal->edn-fn`, `format-signal->json-fn` to single `pr-signal-fn`
Thanks to @AdamFrey for reporting this issue!
Ref. <https://clojurians.slack.com/archives/C06ALA6EEUA/p1713805333272469>
Previously:
Attempting to run AOT'd code using Telemere would result in errors like:
"Attempting to call unbound fn: #'taoensso.telemere.handlers.open-telemetry/handler:open-telemetry-logger"
The approach I was using of conditionally requiring namespaces and then aliasing vars seems to be inherently
fragile under AOT, and was leading to the remote source var being unbound.
With this commit I've now switched to a simpler approach - where we conditionally require namespaces *without*
the need for any aliasing.