bhauman / rebel-readline

Terminal readline library for Clojure dialects
Eclipse Public License 1.0
684 stars 37 forks source link

Random errors and warnings due to load-slow-deps! #219

Open metametadata opened 3 months ago

metametadata commented 3 months ago

I directly use rebel-readline.core/with-line-reader, rebel-readline.jline-api/safe-terminal-writer, etc. and I've observed different random exceptions and warnings logs on starting my REPL. Some examples:

Investigating the stack traces, looks like they are caused by async require calls in rebel-utils/load-slow-deps! leading to some race condition.

My workaround was to make this helper synchronous:

(alter-var-root #'rebel-utils/load-slow-deps!
                (constantly
                  #(do
                     (require 'cljfmt.core)
                     (require 'compliment.core))))