cider-jack-in-clj
Choose clojure-cli it starts a repl and gives me a clj repl buffer.
After this run:
cider-jack-in-cljs
Choose shadow it starts a repl and gives me a cljs repl buffer.
cider-jack-in-clj
Choose clojure-cli it starts a repl and gives me a clj repl buffer.
After this run:
cider-jack-in-cljs
It asks me
A session with the same parameters exists (Development/raw-admin:localhost:33751). You can connect a sibling instead. Proceed? (y or n) y
I choose y and then it prints:
[nREPL] Starting server via /usr/bin/clojure -A:dev -Sdeps '{:deps {org.clojure/tools.nrepl {:mvn/version "0.2.13"} refactor-nrepl {:mvn/version "2.4.0"} cider/cider-nrepl {:mvn/version "0.18.0"}}}' -e '(require (quote cider-nrepl.main)) (cider-nrepl.main/init ["refactor-nrepl.middleware/wrap-refactor", "cider.nrepl/cider-middleware"])'...
And after that nothing happens. I also tried it the other way around so first cider-jack-in-cljs and then cider-jack-in-clj but that doesn't make a difference. It also gives me the following warning:
Run in a mixed clj and cljs project
cider-jack-in-cljcider-jack-in-cljsThe cljs repl will never give a repl buffer. I also tried first starting the cljs repl and then the clj this does not seem to make a difference.
;; Connected to nREPL server - nrepl://localhost:33751
;; CIDER 0.18.1snapshot, nREPL 0.2.13
;; Clojure 1.9.0, Java 1.8.0_181
GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-07-05
Arch Linux, gnome-shell 2.28
I have the exact same situation; I start a second repl and the first one suddenly says cider[not connected]. If I evaluate something directly in the [not connected] repl, it picks up the connection and the second repl becomes [not connected].
On Sep 12, 2018, at 10:56 AM, Mitchel Kuijpers notifications@github.com wrote:
Expected behavior
cider-jack-in-clj
Choose clojure-cli it starts a repl and gives me a clj repl buffer.
After this run:cider-jack-in-cljs
Choose shadow it starts a repl and gives me a cljs repl buffer.Actual behavior
cider-jack-in-clj
Choose clojure-cli it starts a repl and gives me a clj repl buffer.
After this run:cider-jack-in-cljs
It asks meA session with the same parameters exists (Development/raw-admin:localhost:33751). You can connect a sibling instead. Proceed? (y or n) y
I choose y and then it prints:[nREPL] Starting server via /usr/bin/clojure -A:dev -Sdeps '{:deps {org.clojure/tools.nrepl {:mvn/version "0.2.13"} refactor-nrepl {:mvn/version "2.4.0"} cider/cider-nrepl {:mvn/version "0.18.0"}}}' -e '(require (quote cider-nrepl.main)) (cider-nrepl.main/init ["refactor-nrepl.middleware/wrap-refactor", "cider.nrepl/cider-middleware"])'...
And after that nothing happens. I also tried it the other way around so first cider-jack-in-cljs and then cider-jack-in-clj but that doesn't make a difference. It also gives me the following warning:Steps to reproduce the problem
Run in a mixed clj and cljs project
cider-jack-in-clj
cider-jack-in-cljs
The cljs repl will never give a repl buffer. I also tried first starting the cljs repl and then the clj this does not seem to make a difference.Environment & Version information
CIDER version information
;; Connected to nREPL server - nrepl://localhost:33751
;; CIDER 0.18.1snapshot, nREPL 0.2.13
;; Clojure 1.9.0, Java 1.8.0_181
Emacs versionGNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-07-05
Operating system
Arch Linux, gnome-shell 2.28
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/clojure-emacs/cider/issues/2447, or mute the thread https://github.com/notifications/unsubscribe-auth/AC_8sHHFnaNpvdc4_udpiioNcLIjcdi-ks5uaMw6gaJpZM4Wk7rh.
@mitchelkuijpers
And after that nothing happens.
"Nothing" could not happen. There must be something going in the background. At least a server buffer should be created and should give some clues of what's going on.
It also gives me the following warning:
You forgot to paste the warning.
I cannot reproduce this problem and to be frank have no idea how two separate sessions could interact. The sessions are completely isolated there should be no interference whatsoever.
In any case, as that message suggests starting a sibling is both faster and leads to an easier to manage setup. Do you have a special reason to use a separate jack in session?
@olleromo
I don't think it's the same problem. I guess you mean that [not connected] is displayed in the mode-line of the other REPL. There is only one place in the code-base where this could happen. Could you please go to that [not connected] repl and try M-x (cider-current-repl). It should throw. I would need a backtrace.
@vspinu I have just updated cider and tried again, and when I check the processes on my machine I see that it starts up a shadow-cljs server. But for some reason sesman or cider never pick up on it. If I run sesman-browser after I started up a clojure and clojurescript repl. It only shows a clj repl.
I also just found out I can do list-processes where I actually found the process running:
nREPL server started on port 44807 on host localhost - nrepl://localhost:44807
shadow-cljs - config: /home/mitchel/Development/atlas-crm-next/shadow-cljs.edn cli version: 2.6.3 node: v10.10.0
shadow-cljs - starting via "clojure"
shadow-cljs - HTTP server for :devcards available at http://localhost:8600
shadow-cljs - HTTP server for :test available at http://localhost:8601
shadow-cljs - server version: 2.6.3
shadow-cljs - server running at http://localhost:9630
shadow-cljs - socket REPL running on port 45139
shadow-cljs - nREPL server started on port 35979
In any case, as that message suggests starting a sibling is both faster and leads to an easier to manage setup. Do you have a special reason to use a separate jack in session?
We have had some problems when not starting up shadow-cljs separately, and shadow injects some extra feature if you run it as a separate session. We also ran into multiple dependencie issues which vanished by running it separately.
Now when I thought about it some more, the main problem is that shadow-cljs needs to add some middleware which the shadow-cljs executable does automatically. Because I just tried starting a shadow-cljs server and then do a connect-sibling-cljs-repl and then cider fails with:
1. Unhandled java.lang.IllegalStateException
Can't change/establish root binding of: *nrepl-cljs* with set
And we rather let shadow-cljs choose which middleware to include instead of figuring them out.
But for some reason sesman or cider never pick up on it.
There is a *nrepl server ...* buffer lying around. Have a look inside and see if it says anything meaningful. If repl buffer hasn't appeared that means the client was never initialized because the server failed.
I have a slight variation of this. I start clj repl, it works. I start cljs repl, it asks me about the existing buffer and whether to continue, I say yes. The cljs repl starts and works. However, the clj buffers now say "not connected" and I can't evaluate anything in clj buffers. If I go to the repl buffer, everything works normally.
Any update on this? I'm facing this problem in a project configured with deps.edn and shadow-cljs.
Any update on this? I'm facing this problem in a project configured with
deps.ednandshadow-cljs.
You may want to check this article for a workaround.
I wrote that :flushed:
I wrote that 😳
I'm sorry! :) It got me moving forward!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!
This issues been automatically closed due to lack of activity. Feel free to re-open it if you ever come back to it.
Most helpful comment
I'm sorry! :) It got me moving forward!