Welcome! Please see the About page for a little more info on how this works.

0 votes
in Errors by
As of Clojure 1.10.1-beta1, errors in non-REPL environments are handled with `ex-str`, which is nice because `ex-str` in turn calls `*explain-out*` which is user-configurable.

However, there is not clear guidance on how best to configure `s/*explain-out*` such that this configuration will be run before other namespaces are loaded. Perhaps 'user.clj' is the correct place for this, but will that always be loaded for all non-REPL tasks?

For instance, this code would set up Expound, but right now I'm not sure how to reliably run it before other namespaces load:


(require '[expound.alpha :as expound] '[clojure.spec.alpha :as s])
(alter-var-root #'s/*explain-out* (constantly (expound/custom-printer {:print-specs? false :show-valid-values? true :theme :figwheel-theme})))

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJ-2501 (reported by bbrinck)
...