Babashka-only support shim. Loaded only via #?(:bb ...) requires — never under JVM
Clojure or ClojureScript.
Babashka ships a precompiled, partial taoensso.encore that shadows the encore jar
(placing the full jar on the classpath does not help). Two problems with that built-in:
map-vals, remove-vals, dissoc-in,
compiling-cljs?.if-let/when-let/catching exist but do not work as macro calls through an
:as enc alias.Rather than de-encore Fulcro's proven :clj/:cljs source, this namespace interns
faithful re-implementations into taoensso.encore at load time (interning overrides the
broken built-ins), so the existing enc/... call sites work unchanged under babashka.
The macros are intentionally named bb-* (not if-let/when-let) because babashka's SCI
special-cases those core names; a bb--prefixed macro avoids that collision, and its value
is then interned into taoensso.encore under the real name.
Requiring this namespace installs the patch; it is required (under #?(:bb ...)) by
com.fulcrologic.fulcro.algorithms.lookup, which every encore-macro-using namespace
requires, so the patch is present before those namespaces are macro-expanded. The patched
fns/macros match encore's documented contracts.
Babashka-only support shim. **Loaded only via `#?(:bb ...)` requires — never under JVM Clojure or ClojureScript.** Babashka ships a *precompiled, partial* `taoensso.encore` that shadows the encore jar (placing the full jar on the classpath does not help). Two problems with that built-in: 1. It is **missing** plain fns Fulcro uses: `map-vals`, `remove-vals`, `dissoc-in`, `compiling-cljs?`. 2. Its `if-let`/`when-let`/`catching` exist but **do not work** as macro calls through an `:as enc` alias. Rather than de-encore Fulcro's proven `:clj`/`:cljs` source, this namespace `intern`s faithful re-implementations into `taoensso.encore` at load time (interning overrides the broken built-ins), so the existing `enc/...` call sites work unchanged under babashka. The macros are intentionally named `bb-*` (not `if-let`/`when-let`) because babashka's SCI special-cases those core names; a `bb-`-prefixed macro avoids that collision, and its value is then interned into `taoensso.encore` under the real name. Requiring this namespace installs the patch; it is required (under `#?(:bb ...)`) by `com.fulcrologic.fulcro.algorithms.lookup`, which every encore-macro-using namespace requires, so the patch is present before those namespaces are macro-expanded. The patched fns/macros match encore's documented contracts.
(bb-catching expr)(bb-catching error-type expr)(bb-catching try-expr error-sym catch-expr)(bb-catching try-expr error-sym catch-expr finally-expr)(bb-catching try-expr error-type error-sym catch-expr finally-expr)Terse cross-platform try/catch. Interned as taoensso.encore/catching (Throwable for the
:all case), matching the arities Fulcro uses.
Terse cross-platform try/catch. Interned as `taoensso.encore/catching` (Throwable for the `:all` case), matching the arities Fulcro uses.
(bb-fatal & args)babashka stub for taoensso.timbre/fatal (missing in bb's built-in timbre); logs at error level.
babashka stub for `taoensso.timbre/fatal` (missing in bb's built-in timbre); logs at error level.
(bb-if-let bindings then)(bb-if-let bindings then else)Supersets clojure.core/if-let: multiple bindings + unconditional :let. Interned as
taoensso.encore/if-let.
Supersets `clojure.core/if-let`: multiple bindings + unconditional `:let`. Interned as `taoensso.encore/if-let`.
(bb-when-let bindings & body)Supersets clojure.core/when-let: multiple bindings + unconditional :let. Interned as
taoensso.encore/when-let.
Supersets `clojure.core/when-let`: multiple bindings + unconditional `:let`. Interned as `taoensso.encore/when-let`.
(compiling-cljs?)Babashka never compiles ClojureScript, so this is always false.
Babashka never compiles ClojureScript, so this is always false.
(dissoc-in m ks)(dissoc-in m ks dissoc-k)(dissoc-in m ks dissoc-k & more)Matches taoensso.encore/dissoc-in for the arities Fulcro uses:
[m ks] - dissoc the leaf key of path ks
[m ks dissoc-k] - dissoc dissoc-k from the map at path ks
[m ks dissoc-k more] - dissoc dissoc-k and each of more from the map at path ks
Empty/absent paths are no-ops (the original map is returned).
Matches `taoensso.encore/dissoc-in` for the arities Fulcro uses: `[m ks]` - dissoc the leaf key of path `ks` `[m ks dissoc-k]` - dissoc `dissoc-k` from the map at path `ks` `[m ks dissoc-k more]` - dissoc `dissoc-k` and each of `more` from the map at path `ks` Empty/absent paths are no-ops (the original map is returned).
(map-vals val-fn m)Returns ?map with (val-fn v) applied to each value. Matches taoensso.encore/map-vals.
Returns `?map` with `(val-fn v)` applied to each value. Matches `taoensso.encore/map-vals`.
(remove-vals val-pred m)Returns ?map, removing keys for which (val-pred v) is truthy. Matches
taoensso.encore/remove-vals.
Returns `?map`, removing keys for which `(val-pred v)` is truthy. Matches `taoensso.encore/remove-vals`.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |