-
-
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
cljs repl switches to previous ns after cider-repl-set-ns change followed by single eval #3503
Comments
As requested on slack concerning this here. I have some extra diagnostic info from my buffers when this issue occurs. Using:
Reproducing the issue from "Steps to reproduce the problem" in the PR description: The (clj) `nrepl-messages buffer has no activity during this. The (cljs) `nrepl-messages buffer has this:
|
I could repro! The bug was introduced in 5f705b0 which matches with your description ( A new MELPA snapshot will be available within a couple hours. Thanks much for persevering with an accurate report. |
Thanks! I’ll try it out soon then. I looked at the changes and they seem to make sense to me. I don’t know exactly why piggieback changes the ns, but at least there is a way to avoid it. |
As a follow-up. I tried the new snapshot and the issue has been resolved for me. 🎉 |
Happy to hear! |
Expected behavior
After initializing a cider clj & cljs repl via
cider-jack-in-clj&cljs
I expect that after performingcider-repl-set-ns
to change to some cljs namespace, the cljs repl buffer will remain in that namespace as I evaluate forms (unless it wasin-ns
or similar of course).Actual behavior
After using
cider-repl-set-ns
to change to a new cljs ns, the cljs repl correctly is set to that ns. I can then evaluate one time within the context of that namespace and get the eval output expected. However, the cljs repl then immediately returns to the last ns prior tocider-repl-set-ns
- typicallycljs.user
.Steps to reproduce the problem
Using this repo https://github.com/reducecombine/fig-main and running
npm install
there first. Then docider-jack-in-clj&cljs
in emacs.Go to the cljs repl buffer. use
cider-repl-set-ns
to change to the cljs nsvemv.fig-main
. Eval any form now, eg.1
, and the ns immmediately changes back to the prior ns, which iscljs.user
by default.The eval actually does work in the correct
vemv.fig-main
ns context, because doing something like(multiply 2 2)
correctly resolvesmultiply
and returns4
.Environment & Version information
Mac OS - Intel chip
CIDER version information
(I've tried with other Clojure versions and it doesn't matter).
Lein / Clojure CLI version
Leiningen 2.9.8
Emacs version
GNU Emacs 29.1 (build 1, x86_64-apple-darwin22.6.0, NS appkit-2299.70 Version 13.6 (Build 22G120)) of 2023-10-05
Spacemacs/emacs using
emacs-plus
this(emacs v28 gave me the same results)
Operating system
OS X 13.6 "Ventura"
JDK distribution
The text was updated successfully, but these errors were encountered: