eerohele / Tutkain

A Sublime Text package for interactive Clojure development
https://tutkain.flowthing.me
Other
68 stars 8 forks source link

Namespace auto-switching breaks when switching namespaces during a long-running evaluation #92

Closed eerohele closed 2 years ago

eerohele commented 2 years ago

Repro:

;; src/foo/bar.clj
(ns foo.bar)

(Thread/sleep 5000)

;; src/baz/quux.clj
(ns baz.quux)

(defn f [x] x)

(f 1)

Eval the sleep first, then (f 1), ns is foo.bar when it should be baz.quux.

Maybe rethink approach: in the REPL, instead of blocking on reader, block on concurrent queue instead waiting for eval context, etc.

eerohele commented 2 years ago

Maybe rethink approach: in the REPL, instead of blocking on reader, block on concurrent queue instead waiting for eval context, etc.

This will break sending multiple forms at once, because the REPL will wait for an eval context after each form. Back to the drawing board.

eerohele commented 2 years ago

Fixed in v0.14.1.