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

Cannot connect a sibling session if nrepl-hide-special-buffers is enabled #2787

Closed
jmckitrick opened this issue Jan 25, 2020 · 1 comment
Closed

Comments

@jmckitrick
Copy link
Contributor

Expected behavior

Both cider-jack-in-clj and cider-jack-in-cljs should work if special buffers are hidden.

Actual behavior

If nrepl-hide-special-buffers is enabled, connecting to a sibling session calls nrepl-start-server-process which does not ’see’ the existing nrepl buffer and fails to generate a new buffer for the new session/connection.

Steps to reproduce the problem

  1. Set nrepl-hide-special-buffers nil
  2. In a project using shadow-cljs, run cider-jack-in-clj first
  3. After 2 succeeds, run cider-jack-in-cljs
  4. Verify that 3 never completes successfully

This should be reproducible in either order: CLJ then CLJS, or vice-versa. The key is using the sibling session to connect, and the option to hide special nrepl buffers.

Environment & Version information

CIDER version information

Include here the version string displayed when
CIDER's REPL is launched. Here's an example:

;; CIDER 0.24.0-snapshot, nREPL 0.6.0
;; Clojure 1.10.1, Java 1.8.0_74

Lein/Boot version

Leiningen 2.9.1

Emacs version

26.3

Operating system

OS X 10.15.2 Catalina

@dpsutton
Copy link
Contributor

Want to add a minimal repro

in a project with just a deps.edn file consisting only of {}, with nrepl-hide-special-buffers set to nil if you jack in twice you will end up with two repls. When you set nrepl-hide-special-buffers to t, jacking in twice will create only a single repl. It will start two jvms but only the first will connect. CIDER mistakenly reuses the first repl's nrepl buffer so the connection callback mechanism is never triggered.

So rather than two files with nREPL server started on port 42097 on host localhost - nrepl://localhost:42097 you end up with one buffer with both connection statements in it:

nREPL server started on port 42097 on host localhost - nrepl://localhost:42097
nREPL server started on port 36653 on host localhost - nrepl://localhost:36653

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

2 participants