Closed kwrooijen closed 3 years ago
Found the issue. The NRepl.cs evaluator calls arcadia.repl/main-thread-eval
. Which in turn calls (main-thread (fn [] (eval s)))
. When replacing this with simply (eval s)
the issue disappears. Also my evaluations are now inside of my editor (that being Emacs) instead of in the terminal where I opened Godot, which is also a big plus in development.
The main-thread
function does have the following comment though:
;; hack to have tooling eval on main thread (as instancing some node types on a thread is currently very slow)
I'm honestly not sure what this means. Maybe you can clarify the purpose? For now I'm going to disable it locally until I run into issues.
the main thread eval was a workaround for https://github.com/arcadia-unity/ArcadiaGodot/issues/14 but yes looks like it broke the Nrepl, will investigate!
yeah this is tricky, the ns error is a thing that happens when you don't bind an initial namespace (see https://clojuredocs.org/clojure.core/*ns*#example-59468a29e4b06e730307db35) but apart from fixing that the async main-thread-eval
would have to get it's results back into the NRepl's loop somehow.
Since none of that was trivial I've reverted main thread eval for NRepl.cs in 55fc5c5ed7ad1074d41ab6536feead8ee894368f
I'll close this and re-open #14
When connecting to the REPL using Cider and evaluating
(ns main.game)
I'm getting the following error: