Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C-x C-e seems hang up #2713

Closed
vinurs opened this issue Sep 16, 2019 · 7 comments
Closed

C-x C-e seems hang up #2713

vinurs opened this issue Sep 16, 2019 · 7 comments

Comments

@vinurs
Copy link

vinurs commented Sep 16, 2019

i use shadow-cljs and react native to develop app, then in the terminal:

shadow-cljs watch app

to start a nrepl, and in emacs, i use cider-connect-cljs to connect to the repl, but when i in the cljs file and run C-x C-e, there is no effect, it seems that it hung up, the expression can not send to the nrepl to run

@vinurs
Copy link
Author

vinurs commented Sep 16, 2019

image
maybe it's that the refactor-nrepl doesn't enabled?

@philippkueng
Copy link

Hi @vinurs, I think I share your fate regarding the issue and take the liberty to post my reproduction steps too in the hopes that we can debug it together a lot quicker. I use the upgraded versions of cider-repl 0.22.3 in my shadow-cljs.edn file which makes the warnings go away.

Looking at the commits of clojure-emacs/cider and your error I think you don't have quite the latest version of cider for emacs as the very latest version requires cider-repl 0.22.3 and not 0.22.2 (maybe that also has an effect)

However when I try to set the repl to the namespace of my app C-c M-n n (which used to work with an older release of cider) it's not setting the namespace. Setting the namespace manually via (in-ns 'app.main) will update the namespace but C-c C-k won't reload the buffer and as you said C-x C-e won't evaluate the expression.

@vinurs
Copy link
Author

vinurs commented Sep 16, 2019

hello @philippkueng , i've update the cider to the latest version, and the warning of 0.22.2 disappear
image
but i don't know the warning "WARNING: No Clojure project was detected. The refactor-nrepl middleware was not enabled. " means

@philippkueng
Copy link

Hi @vinurs

I reverted back to my old configuration yesterday which still works using the configuration below:

shadow-cljs: 2.8.37
[cider/cider-nrepl "0.21.0]

emacs packages

cider-20190114.1422
cider-eval-sexp-fu-20160907.800
clojure-mode-20190105.1043
clojure-snippets-20180314.1308

I will will invest a bit more time into debugging it later tonight but basically what I figured out so far is that when I use an "old" combination of cider for emacs and use the latest version of shadow-cljs (2.8 .52) the repl connection it creates when issuing cider-connect-clojurescript is labelled [clj] and not [cljs] which is what occurs when using my old version 2.8.37

Screenshot 2019-09-18 at 07 54 57

Screenshot 2019-09-18 at 07 37 55

Stepping through the emacs debugger I believe that this is the issue even when using the latest release of cider from melpa.

Now this sadly won't fix your No Clojure project was detected warning but my hopes are that it's something that will become obvious once we can evaluate expressions to the repl again.

@bbatsov
Copy link
Member

bbatsov commented Sep 18, 2019

It seems some recent changes to shadow-cljs (related to its piggieback emulation) broke the REPL type detection in CIDER, but this has to be addressed on the shadow-cljs side. I haven't had much time to look into the matter, though, I just saw a few people reporting similar problems on Slack.

@vinurs
Copy link
Author

vinurs commented Sep 18, 2019

i switch the shadow-cljs version to 2.8.40, it works as expected.

@vinurs
Copy link
Author

vinurs commented Sep 20, 2019

the latest version fix this

@vinurs vinurs closed this as completed Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants