Hi - I’m getting the exactly the same problem detalied https://github.com/Olical/conjure/issues/234 when running clojure and clojurescript repls.
; --------------------------------------------------------------------------------
; shadow-cljs (select): app
; (err) Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:471).
; (err) shadow.cljs.devtools.api
I’ve tried using state and stopped autoloading etc as suggested by @olical but still have the problem.
Can someone help with how they set this up to work ?I'm never quite sure if this is the right way to do things, but this is what works for me:
• npx shadow-cljs watch app
• Connect to the nREPL started by shadow-cljs by opening a clj file
• <leader>sf to add a new fresh session
• :ConjureShadowSelect app to connect to the browser repl
• Use <leader>sn to switch between sessions as needed
I think a requirement for this setup to work is to have shadow pick up the dependencies of the main project.
I do this by using deps.edn to manage my deps:
{:deps {:aliases [:cljs]}
...}Thank you @ake I am new to ClojureScript and it’s not as simple as it first seems with combinantion of repl, nrepl+sessions, piggie backing, shadow-clj etc.
I see that conjure will connect to the .shadow-cljs/nrepl.port
if there is no ./.nrepl.port so we get a repl for clj.
The problem I have here is that in my deps file I have aliases for the clj code and different aliases for the cljs code. I would like the two nrepl sessions to have different class paths etc.
In the .shadow-clj.edn I have
{:deps {:aliases [:dev :cljs :cljs-dev :cljs-build]}
These are for the cljs. I have the equivalent :clj :clj-dev :clj-build aliases for the clj.
Do you know if there is a way of defining aliases for the different sessions ?
I have managed to get this going how I want
1. start a nrepl from the command line using my clj alisases: clojure "-M:conjure:dev:clj:clj-dev"
2. start a shadow clojure repl from the command line: shadow-cljs watch app with the aliases in .shadow-cljs.edn {:deps {:aliases [:dev :cljs :cljs-dev :cljs-build]}
3. :ConjureConnect
4. :ConjureConnect
and I can switch from one repl to another by using :ConjureClientState