diff --git a/src/cider/nrepl/middleware/refresh.clj b/src/cider/nrepl/middleware/refresh.clj index 43480341..b4839a1c 100644 --- a/src/cider/nrepl/middleware/refresh.clj +++ b/src/cider/nrepl/middleware/refresh.clj @@ -113,7 +113,7 @@ transport (response-for msg {:status :ok})))) -(defn- before-reply +(defn before-reply [{:keys [before transport] :as msg}] (when before (transport/send @@ -130,7 +130,7 @@ :invoked-not-resolved) :before before}))))) -(defn- after-reply +(defn after-reply [{error ::reload/error} {:keys [after transport] :as msg}] diff --git a/src/cider/nrepl/middleware/reload.clj b/src/cider/nrepl/middleware/reload.clj index 244f0b4d..7acfe11f 100644 --- a/src/cider/nrepl/middleware/reload.clj +++ b/src/cider/nrepl/middleware/reload.clj @@ -3,6 +3,7 @@ Alternative to cider.nrepl.middleware.refresh, using clj-reload instead of tools.namespace." (:require + [cider.nrepl.middleware.refresh :as refresh] [clj-reload.core :as reload] [clojure.main :refer [repl-caught]] [clojure.string :as str] @@ -47,7 +48,9 @@ (exec id (fn [] (try + (refresh/before-reply msg) (operation msg) + (refresh/after-reply {} msg) (respond msg {:status :ok}) (catch Throwable error (respond msg {:status :error