Errors running with cursive
eoliphan opened this issue · 3 comments
Hi, when integrating with cursive/idea per the setup instructions (clojure.main, deps, and the following:
:reveal {:main-opts ["-m" "vlaaad.reveal" "repl"]
:extra-paths ["dev"]
:extra-deps {vlaaad/reveal {:mvn/version "1.2.185"}}
Everything works fine from my startup namespace in dev/user.clj. However, switching namespaces doesn't seem to work at all. Evaluating any symbol refs nets you a Unable to resolve symbol: xxx in this context
including, unfortunately load-file
when you attempt to reload the current ns.
Any suggestions?
Hi! About load-file
— I have the same problem, I would suggest adding +1 to this issue: cursive-ide/cursive#2478
About switching namespaces — can you describe how it doesn't work? When I'm in the REPL and I open a file that is not yet loaded, I invoke the "Load File in REPL" IDE command and it works. If it's loaded, I invoke "Switch REPL NS to Current File" and it works. There might be a problem when I do "Switch" before the namespace is loaded. In this case, "Load File" will not work because of the issue above — ns is a freshly created one and is not yet fully initialized. In this situation, I evaluate the ns form at the top and then do "Load File" to load everything else.
Hi @vlaaad, thanks I've +1'ed the issue and yes that workaround takes care of it. "Switch then Load" fails, but "Load then Switch" and the ns-eval work just fine.
My pleasure! I know it's unfortunate that things don't always "just work". On the flip side, I'm happy with this setup because it matches real Clojure evaluation semantics: sequential evaluation of forms, one at a time.