-
-
Notifications
You must be signed in to change notification settings - Fork 645
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-toggle-buffer-connection fails #1913
Comments
@dpsutton did you end up looking into this? |
Cljc buffers send their evals to both clj and cljs repls if available due to `cider-map-connections`. Toggling a current buffer's connection involves hiding the other connection. Previously, when toggling _again_, the original list was not consulted and only the truncated list, preventing the other connection from being found. This allows for the full list to be searched for the other buffer. In addition, a prefix dictates that the local connection list is discarded in favor of the full list, restoring the evaluation in both clj and cljs buffers (if both are present).
Cljc buffers send their evals to both clj and cljs repls if available due to `cider-map-connections`. Toggling a current buffer's connection involves hiding the other connection. Previously, when toggling _again_, the original list was not consulted and only the truncated list, preventing the other connection from being found. This allows for the full list to be searched for the other buffer. In addition, a prefix dictates that the local connection list is discarded in favor of the full list, restoring the evaluation in both clj and cljs buffers (if both are present).
Cljc buffers send their evals to both clj and cljs repls if available due to `cider-map-connections`. Toggling a current buffer's connection involves hiding the other connection. Previously, when toggling _again_, the original list was not consulted and only the truncated list, preventing the other connection from being found. This allows for the full list to be searched for the other buffer. In addition, a prefix dictates that the local connection list is discarded in favor of the full list, restoring the evaluation in both clj and cljs buffers (if both are present).
Cljc buffers send their evals to both clj and cljs repls if available due to `cider-map-connections`. Toggling a current buffer's connection involves hiding the other connection. Previously, when toggling _again_, the original list was not consulted and only the truncated list, preventing the other connection from being found. This allows for the full list to be searched for the other buffer. In addition, a prefix dictates that the local connection list is discarded in favor of the full list, restoring the evaluation in both clj and cljs buffers (if both are present).
Something to note: the reported behavior is not correct. When eval-ing code in a cljc buffer under This happens because the toggling worked by setting a buffer local Now the behavior is
|
Cljc buffers send their evals to both clj and cljs repls if available due to `cider-map-connections`. Toggling a current buffer's connection involves hiding the other connection. Previously, when toggling _again_, the original list was not consulted and only the truncated list, preventing the other connection from being found. This allows for the full list to be searched for the other buffer. In addition, a prefix dictates that the local connection list is discarded in favor of the full list, restoring the evaluation in both clj and cljs buffers (if both are present).
Expected behavior
cider-toggle-buffer-connection
should toggle between CLJ and CLJS connections (if both exist) in aclojurec-mode
buffer (e.g.cljc
files) or in acider-clojure-interaction-mode
buffer (e.g.*cider-scratch*
). This should allow expressions to be evaluated in the appropriate connection. Also,cider-connections
should still contain both CLJ and CLJS connections after toggling.Actual behavior
Connection to REPL is seemingly lost; evaluating expressions causes CIDER to complain that a Clojure REPL is required and that a jack in is probably needed. Also,
cider-connections
loses one of the connections (the current one).Steps to reproduce the problem
lein new cider-toggle-buffer-connection
project.clj
to the following:mv src/cider-toggle-buffer-connection/core.cljs src/cider-toggle-buffer-connection/core.cljc
src/cider-toggle-buffer-connection/core.cljc
to the following:src/cider-toggle-buffer-connection/core.cljc
in emacs.cider-jack-in-clojurescript
.cider-connections
: there should be two connections (CLJ and CLJS).(println "Test")
withcider-eval-last-sexp
. This should print "Test" in the*cider-repl cider-toggle-buffer-connection*
buffer.cider-toggle-buffer-connection
.(println "Test")
withcider-eval-last-sexp
. This should cause CIDER to complain with the following message:cider-connections
: only the CLJS connections remains.Environment & Version information
CIDER version information
Emacs version
Operating system
OSX 10.11.6
The text was updated successfully, but these errors were encountered: