Skip to content

Commit

Permalink
Update src/xiana/hotreload.clj
Browse files Browse the repository at this point in the history
Co-authored-by: A. Marius Rabenarivo <mariusrabenarivo@gmail.com>
  • Loading branch information
gmsvalente and puchka authored Apr 10, 2024
1 parent 79d2b4a commit d07f18c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/xiana/hotreload.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@

;; reloader function from ring.middleware.reload

(defn- reloader [dirs retry?]
(defn- reloader
"Reload namespaces of modified files before the request is passed to the
supplied handler.
Accepts the following options:
:dirs - A list of directories that contain the source files.
Defaults to ["src"].
:retry? - If true, keep attempting to reload namespaces
that have compile errors. Defaults to true."
[dirs retry?]
(let [modified-namespaces (ns-tracker dirs)
load-queue (java.util.concurrent.LinkedBlockingDeque.)]
(fn []
Expand Down

0 comments on commit d07f18c

Please sign in to comment.