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

cider-jack-in doesn't work well with boot #2644

Closed
lispyclouds opened this issue Jun 4, 2019 · 26 comments
Closed

cider-jack-in doesn't work well with boot #2644

lispyclouds opened this issue Jun 4, 2019 · 26 comments
Labels

Comments

@lispyclouds
Copy link

lispyclouds commented Jun 4, 2019

Expected behavior

After cider-jack-in, I should be able to use CIDER and navigate normally.

Actual behavior

cider-jack-in succeeds but causes emacs to freeze for a couple of seconds and the following error is seen:
Screen Shot 2019-06-04 at 9 47 30 AM
Other issues:

  • jump-to-definition also doesn't work after this.
  • The cider repl is in an uninitialized state
    Screen Shot 2019-06-04 at 11 33 26 AM

Steps to reproduce the problem

  • Use any clojure project using boot
  • Perform cider-jack-in
  • Observe emacs freeze and the error appear

Environment & Version information

CIDER version information

CIDER master
Clojure 1.10
Java 12

Lein/Boot version

Boot 2.8.3

Emacs version

Emacs 26.2 with Spacemacs develop

Operating system

MacOS 10.14.5

@lispyclouds
Copy link
Author

Possibly related to #2643

@lispyclouds lispyclouds changed the title jack-in doesn't work well with boot cider-jack-in doesn't work well with boot Jun 4, 2019
@bbatsov
Copy link
Member

bbatsov commented Jun 4, 2019

@arichiardi @alexander-yakushev Can you confirm the problem?

@alexander-yakushev
Copy link
Member

It works fine for me on Java 8 and Boot 2.8.2.

Could you please downgrade to Boot 2.8.2 for a test? That newer build of Boot doesn't seem to work correctly in many regards.

@bbatsov
Copy link
Member

bbatsov commented Jun 4, 2019

It doesn't? I thought there were virtually no internal changes there.

@lispyclouds
Copy link
Author

2.8.2 on Java 12 has the same issues as well

@lispyclouds
Copy link
Author

Tried running boot 2.8.2 on java 1.8.0_212 with no luck as well.

@arichiardi
Copy link
Contributor

I tried only 2.8.3 and it seemed to be working

@arichiardi
Copy link
Contributor

I noticed that the nRepl launcher does some ask of dancing so that might be the difference

@alexander-yakushev
Copy link
Member

Is there anything in your profile.boot that can influence this?

@lispyclouds
Copy link
Author

@arichiardi you're right it does seem to work on a sample project i tried: https://github.com/oakes/full-stack-boot-example but i can see the issue on mine for some reason: https://github.com/bob-cd/bob

@lispyclouds
Copy link
Author

@alexander-yakushev I don't really have a profile.boot. just the boot.properties file

@arichiardi
Copy link
Contributor

When I get to the office I am going to try your project, thanks and sorry. I also had one other version using nrepl directly so @bbatsov might want to revert to that instead.

@lispyclouds
Copy link
Author

Thanks a lot!

@alexander-yakushev
Copy link
Member

@lispyclouds Actually, if you are trying to jack in with cider-nrepl 0.22.0-beta2, it is broken for me as well.

@bbatsov
Copy link
Member

bbatsov commented Jun 4, 2019

When I get to the office I am going to try your project, thanks and sorry. I also had one other version using nrepl directly so @bbatsov might want to revert to that instead.

Let's figure out what's wrong first. We've used Boot's default task for a very long time, so I'm really puzzled by this development.

I noticed that the nRepl launcher does some ask of dancing so that might be the difference

I guess you mean ack, not ask, right? That's something that Lein does as well, and it's pretty simple. Not sure how many clients (if any) rely on ack, but I doubt it's causing the problem, as it has always been there.

@bbatsov bbatsov added the bug label Jun 4, 2019
@lispyclouds
Copy link
Author

@alexander-yakushev yes that's what i was trying with

@arichiardi
Copy link
Contributor

I guess you mean ack, not ask, right?

Yes sorry was on the phone

@arichiardi
Copy link
Contributor

Can confirm the stuck emacs and the timeout in bob.:

error in process filter: nrepl-send-sync-request: Sync nREPL request timed out (op describe)
error in process filter: Sync nREPL request timed out (op describe)

@bbatsov
Copy link
Member

bbatsov commented Jun 5, 2019

Any idea what's the real reason? That error message simply means that nREPL didn't boot up properly. What's happens when you run the boot shell command outside of Emacs?

@arichiardi
Copy link
Contributor

Will try that as well

@bbatsov
Copy link
Member

bbatsov commented Jun 11, 2019

@arichiardi Any progress with the investigation?

@arichiardi
Copy link
Contributor

Didn't have time, will try this week hopefully

@lispyclouds
Copy link
Author

Hello, is there any updates on this? I poked around a bit and it really seems only my source code produces this issue. If there is some way I can help I'm happy to do it! 😄 I have a feeling this could be some issue in my build.boot?

@bbatsov
Copy link
Member

bbatsov commented Jul 30, 2019

@lispyclouds I'm still waiting for someone to report that's the actual problem (which should be reproducible by running the command CIDER generated in some terminal).

@arichiardi
Copy link
Contributor

Sorry been travelling and kind of on holiday at the moment, not sure I can carve some time for this but will try to

@lispyclouds
Copy link
Author

lispyclouds commented Aug 3, 2019

This has been solved now. As I suspected, the issue was in my build.boot evaling the main ns which took a while for me as I had a mount state there. That caused CIDER to timeout while waiting for nREPL to come up. Setting something like (setq nrepl-sync-request-timeout 100) fixed this! Found the fix when hacking with @bbatsov himself and can't be more thankful to him and the entire CIDER team! 🙏 Sorry for the trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants