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

Unintuitive behaviour of cider-connect-sibling #3012

Closed
yuhan0 opened this issue May 6, 2021 · 1 comment · Fixed by #3013
Closed

Unintuitive behaviour of cider-connect-sibling #3012

yuhan0 opened this issue May 6, 2021 · 1 comment · Fixed by #3013
Labels

Comments

@yuhan0
Copy link
Contributor

yuhan0 commented May 6, 2021

Expected behavior

When I'm in a cljs buffer in a project with only a clj repl, I expect to be able to M-x cider-connect-sibling-cljs to start up a clojurescript repl within the same session.
Mental model: "Connect this buffer to existing ones"

Actual behavior

An error message is produced

No cljs REPLs in current session "..."

It seems that I have to navigate to a clj file in order to execute cider-connect-sibling-cljs, which seems quite unintuitive.
Mental model: "Connect other repl to this live buffer"

The reverse situation is also true - with a cljs repl in the session, I cannot cider-connect-sibling-clj from a clj file

Steps to reproduce the problem

src/
  foo.clj
  bar.cljs
  • Navigate to bar.cljs
    M-x cider-connect-clj
    M-x cider-connect-sibling-cljs

  • Error message is produced.

  • Navigate to foo.clj, or M-x clojure-mode to trick Cider to thinking we're in a clj file.
    M-x cider-connect-sibling-cljs

  • cljs repl is successfully connected

Environment & Version information

CIDER version information

;; CIDER 1.1.0 (Plovdiv), nREPL 0.7.0
;; Clojure 1.10.1, Java 13.0.2

Emacs version

28.0.50

Operating system

macOS 11.2.1

@bbatsov bbatsov added the bug label May 6, 2021
@bbatsov
Copy link
Member

bbatsov commented May 6, 2021

That's definitely a bug. PRs welcome!

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

Successfully merging a pull request may close this issue.

2 participants