cider-jack-in-clj&cljs issue

Created on 1 Nov 2018  ·  7Comments  ·  Source: clojure-emacs/cider

Expected behavior

Both clj and cljs repls process input correctly

Actual behavior

clj repl hangs on any command. [== ] "progress bar" is running indefinitely, no output produced.

Steps to reproduce the problem

  1. Open Emacs
  2. Open project file
  3. run cider-jack-in-clj&cljs
  4. Switch to clj repl
  5. Type any command e.g. (+ 1 1)
  6. No output produced, "progress bar" spins indefinitely

This does not happen if I use cider-jack-in instead of cider-jack-in-clj&cljs

UPD:

  1. run cider-jack-in-clj
  2. repl runs ok
  3. run cider-jack-in-cljs
  4. clj repl stops working after cljs repl starts

UPD2:

  1. run cider-jack-in-clj
  2. repl runs ok
  3. run cider-connect-sibling-clojurescript
  4. clj repl stops working after cljs repl starts

UPD3:

Tried to switch to figwheel-main instead of figwheel as a cljs repl type. Got a message Figwheel-main is not available. Please check [cider docs link]

UPD4:

Managed to set up figwheel-main. The same issue persists - as soon as cljs repl starts - clj repl hangs.

Environment & Version information

CIDER version information

 CIDER 0.19.0snapshot (package: 20181030.2222), nREPL 0.2.12
 Clojure 1.9.0, Java 1.8.0_20

Lein/Boot version

Leiningen 2.8.1 on Java 1.8.0_20 Java HotSpot(TM) 64-Bit Server VM

Emacs version

GNU Emacs 26.1

Operating system

MacOS Mojave 10.14.1

Most helpful comment

@arichiardi let me try. I think I forgot to mention that it's Spacemacs.

All 7 comments

Same here

There is a similar issue opened somewhere, also with fighweel. Till a simple project where this could be reproduced emerges I don't think there are hopes for fixing this.

@achikin can you reproduce with https://github.com/bhauman/figwheel-main/blob/master/README.md#try-figwheel-with-flappy-bird

I was using that without glitches with cider master last weekend.
In case you do, another thing that could be beneficial to see is the $HOME/.lein/profile.clj

@arichiardi let me try. I think I forgot to mention that it's Spacemacs.

@arichiardi I've re-installed Spacemacs and everything works as expected.
Reproducible builds ¯ \ _ (ツ) _ / ¯

I just hit this issue as well. It seems the Clojure REPL hangs while the ClojureScript one is in the pending state.

I'm using Cider's connect rather than jack-in, my _project.clj_ file has the figwheel-main, cider/piggieback and nrepl dependencies, the cider/cider-nrepl plugin, and cider.piggieback/wrap-cljs-repl configured. I'm also serving the cljs app from the clj one and not figwheel-main's server!

This ends up in a deadlock where the cljs repl is pending a connection from the browser, the browser is waiting for the app server to come online, and the app server's repl hangs while the cljs one is pending a connection.

Fortunately, figwheel-main's default index also connects to the REPL; opening the domain part of the connect url in the browser unlocks both REPLs. However, for some unknown reason both the clj and cljs REPLs get swapped, without their current namespaces changing. Things work fine once I change those current namespaces back.

(I tried reinstalling Spacemacs, but it didn't work!)

Is there a solution for this?

Was this page helpful?
0 / 5 - 0 ratings