afucher / clojure-repl-intellij

Free OpenSource IntelliJ plugin for Clojure REPL development.
MIT License
59 stars 9 forks source link

Refactor nrepl communication to handle Transport manually #67

Closed ericdallo closed 5 months ago

ericdallo commented 5 months ago

This PR refactors how we communicate with NREPL, the major problem is that nrepl is a server so it can send messages at any time through the socket, and we were ignoring those messages, only caring by the ones we sent sync.

Code snippets to test:


(deftest a-test
  (println "foo")
  (is (= {:a 2 :b 2}
         (sample.core/|fob))))

(future (Thread/sleep 1000) (println "foo"))