From 50b716404e8d628bc0cca78e02a06143fe206c34 Mon Sep 17 00:00:00 2001 From: DevGiu Date: Sat, 18 Apr 2026 15:29:50 +0200 Subject: [PATCH] fix: avoid REPL teardown lock poisoning --- clj/src/cljd/build.clj | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/clj/src/cljd/build.clj b/clj/src/cljd/build.clj index 16ed839d..fb792682 100644 --- a/clj/src/cljd/build.clj +++ b/clj/src/cljd/build.clj @@ -255,14 +255,14 @@ [cljd.flutter.repl :refer [pick! mount!]] [cljd.flutter :as f] ["package:flutter/material.dart" :as m]))] - (locking *compiler-state - (let [p (promise) - _ (swap! *repl-states assoc-in [repltag :ack!] #(deliver p %)) - _ (eval-to-repl repltag expr-or-throwable *compiler-state trigger-reload p) - str-or-throwable @p] - (if (instance? Throwable str-or-throwable) - (throw str-or-throwable) - (set! compiler/*current-ns* (symbol str-or-throwable))))) + (let [p (promise) + _ (locking *compiler-state + (swap! *repl-states assoc-in [repltag :ack!] #(deliver p %)) + (eval-to-repl repltag expr-or-throwable *compiler-state trigger-reload p)) + str-or-throwable @p] + (if (instance? Throwable str-or-throwable) + (throw str-or-throwable) + (set! compiler/*current-ns* (symbol str-or-throwable)))) (let [x (try (compiler/read {:eof *in* :read-cond :allow :features #{:cljd}} *in*) (catch Throwable t t))]