Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

cljs repl switches to previous ns after cider-repl-set-ns change followed by single eval (again) #3728

Copy link
Copy link
Open
@mrrodriguez

Description

@mrrodriguez
Issue body actions

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 performing cider-repl-set-ns to change to some cljs namespace, the cljs repl buffer will remain in that namespace as I evaluate forms (unless it was in-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 in CIDER 1.8.0-snapshot up until 1.15 I had no issues. The emacs upgrade alone (and maybe lein 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 to cider-repl-set-ns - typically cljs.user.

Steps to reproduce the problem

Using this repo https://github.com/reducecombine/fig-main and running npm install there first. Then do cider-jack-in-clj&cljs in emacs.

Go to the cljs repl buffer. use cider-repl-set-ns to change to the cljs ns vemv.fig-main. Eval any form now, eg. 1, and the ns immmediately changes back to the prior ns, which is cljs.user by default.

The eval actually does work in the correct vemv.fig-main ns context, because doing something like (multiply 2 2) correctly resolves multiply and returns 4.

Environment & Version information

Mac OS - Intel chip

CIDER version information

CIDER 1.15.1 (Cogne)

(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 this

Operating system

OS X 14.5 "Sonoma"

JDK distribution

OpenJDK Runtime Environment Temurin-11.0.24+8 (build 11.0.24+8)
OpenJDK 64-Bit Server VM Temurin-11.0.24+8 (build 11.0.24+8, mixed mode)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.