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

REPL namespace gets reset to cljs.user when using CIDER #33

Closed
nybbles opened this issue Nov 27, 2014 · 2 comments
Closed

REPL namespace gets reset to cljs.user when using CIDER #33

nybbles opened this issue Nov 27, 2014 · 2 comments

Comments

@nybbles
Copy link

nybbles commented Nov 27, 2014

I am experiencing this on a project based on code generated by the chestnut lein template. I would switch my CLJS repl namespace to foo.core. It would stay as foo.core until I eval'ed something, even trivial forms like (+ 1 1). This would cause the CLJS repl namespace to be reset to cljs.user. This problem only occurred with CLJS, in CIDER and only when I use the C-c M-n keybinding.

CLJ REPLs work fine. The issue doesn't show up when I just use lein repl.

It looks like what is happening is that the REPL namespace is only being changed on Emacs and not on the browser itself. Therefore, nrepl sends back the same old cljs.user namespace, as can be seen by the output of *nrepl-messages* below.

(--->
  ns  "foo.core"
  op  "eval"
  session  "c935c36d-53d0-41e1-99d7-4abfff10d581"
  code  "(+ 1 1)\n"
  id  "17"
)
(<-
  id  "17"
  ns  "cljs.user"
  session  "c935c36d-53d0-41e1-99d7-4abfff10d581"
  value  "2"
)

If I explicitly set my namespace using (in-ns 'foo.core), this problem does not occur.

@cemerick
Copy link
Collaborator

I think this might be related to the issue described in clojure-emacs/cider#909.

@cemerick
Copy link
Collaborator

The work on the new-cljs-repl branch, currently available in 0.2.0-SNAPSHOT, is effectively a rewrite due to the new ClojureScript REPL API, etc. Closing all issues filed against 0.1.x; most (or all) of them should be resolved and/or irrelevant.

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

No branches or pull requests

2 participants