-
-
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 (again) #3728
Comments
I will give diagnostics here the same as I did before in #3503 (comment) 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:
Note: It doesn't matter what form I eval, I always get the result of that expression and then the immediate changing of the ns back to |
Thanks! I'll check it. Might be a Figwheel-specific issue - nowadays we put far more attention to shadow-cljs, which is why a minimal repro over https://github.com/reducecombine/icd.scroll would be also useful. Either ways, I'll try to repro the problem in both projects as time allows. |
My real problem case is in a figwheel-main project (the same as the last time I reported this same sort of issue in #3503 ). I will try (tomorrow) to give some details for the shadow-cljs setup as well just to provide more information. |
I ran the same experiment as above with the https://github.com/reducecombine/icd.scroll which notably uses jack-in with I do NOT observe this issue in the For completeness: I will give diagnostics here the same as I did before in #3503 (comment) 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:
|
Hi Mike, awesome, I appreciate a lot the thorough effort. Now it might be a matter of nailing down the issue to a specific Fig version. Does it work correctly for you if you use the latest Fig version as of #3503 (comment)? I reckon the variables that you can play with are
From intuition, it should be a Fig thing, but let me know. |
The example from https://github.com/reducecombine/fig-main uses I don't suspect it is the cider version specifically since I had no changes to that when the problem begun to happen to me. I also had no change to figwheel-main version recently What I did have change was:
At this point, perhaps it is looking like What I think is relevant here though is that these are all nearly the "latest" version of each dependency involved - so I'd think this is the main case we'd expect to not be broken. |
In case it helps, on a unixy box you can try the older Lein by downloading https://github.com/technomancy/leiningen/blob/2.9.8/bin/lein to somewhere in your path. Normaly I do |
I need to gather more experimental details here, but I'll update that I did bring the |
I am observing the same problem again as reported and solved in #3503
The only differences will be in the versions involved.
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).I have not had this issue in any recent
cider
versions over the last 6 months or so with emacs 29.1. I was using a few versions of cider along the way after the fix inCIDER 1.8.0-snapshot
up until 1.15 I had no issues. The emacs upgrade alone (and maybelein
at the same time) is where I started to see this behavior come back again.I had this problem with 1.15 of cider so I tried 1.15.1 and I get the same behavior.
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.11.2
Emacs version
GNU Emacs 29.4 (build 1, x86_64-apple-darwin23.5.0, NS appkit-2487.60 Version 14.5 (Build 23F79)) of 2024-07-21
Spacemacs/emacs using
emacs-plus
thisOperating system
OS X 14.5 "Sonoma"
JDK distribution
The text was updated successfully, but these errors were encountered: