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

Namespace not found #950

Closed
manuel-uberti opened this issue Jan 16, 2015 · 12 comments
Closed

Namespace not found #950

manuel-uberti opened this issue Jan 16, 2015 · 12 comments

Comments

@manuel-uberti
Copy link
Contributor

I'm getting Namespace not found. everytime I try to set the namespace on which I am working on. I've tried with different projects, but I'm getting the same error.

Some details about my system, if it could be of any help:

OS: Debian GNU/Linux 8 (jessie)
Kernel: Linux 3.16.0-4-686-pae i686

Emacs version:

GNU Emacs 25.0.50.1 (i686-pc-linux-gnu, X toolkit, Xaw scroll bars)
 of 2015-01-15

CIDER version:

CIDER 0.9.0snapshot (package 20150114.512)
@bbatsov
Copy link
Member

bbatsov commented Jan 16, 2015

Can you provide exact steps to reproduce this problem?

@manuel-uberti
Copy link
Contributor Author

Sure:

  • I open a .clj file inside one project (i.e. core.clj)
  • I put the cursor at the end of the line where I specify the namespace (i.e. (ns clojure-brave.core))
  • I press C-c C-e

@manuel-uberti
Copy link
Contributor Author

To expand on this one: I load core.clj with C-c C-l, then try to set the namespace with C-c M-n and it works.

@bbatsov
Copy link
Member

bbatsov commented Jan 17, 2015

I put the cursor at the end of the line where I specify the namespace (i.e. (ns clojure-brave.core))

The evaluate of ns forms in CIDER is a bit special (see this). Maybe this was affected by the recent nREPL changes; I'll have to debug it.

@eigenhombre
Copy link
Contributor

Just updated Cider and am now drastically handicapped by this bug :-(

cider 20150118.2309
emacs 24.4 (9.0)
os-x

@manuel-uberti
Copy link
Contributor Author

You could use the workaround described here, for now.

@eigenhombre
Copy link
Contributor

Thanks @boccaperta-it -- that helps a lot.

@bbatsov
Copy link
Member

bbatsov commented Jan 20, 2015

I found the problem. cider-interactive-eval no longer uses cider-eval and the ns forms are not evaluated in the user namespace. //cc @vspinu

The problem has existed for a while, but was hidden by the use of load-file for interactive evaluation.

eigenhombre pushed a commit to eigenhombre/emacs-config that referenced this issue Jan 20, 2015
@vspinu
Copy link
Contributor

vspinu commented Jan 21, 2015

I found the problem. cider-interactive-eval no longer uses cider-eval and the ns forms are not evaluated in the user namespace. //cc @vspinu

I am pretty sure this was working as expected when cider-interactive-eval was relying on load-file. It's not true anymore since 1dba82f.

vspinu added a commit to vspinu/cider that referenced this issue Jan 21, 2015
@bbatsov
Copy link
Member

bbatsov commented Jan 21, 2015

I am pretty sure this was working as expected when cider-interactive-eval was relying on load-file. It's not true anymore since 1dba82f.

That's what I said as well. :-) On a related note - we should probably remove cider-eval as it was created just to deal with interactive evaluations.

@eigenhombre
Copy link
Contributor

@bbatsov bbatsov closed this as completed Jan 25, 2015
@bbatsov
Copy link
Member

bbatsov commented Jan 25, 2015

I've restored the pre-0.8 behaviour and will work with @vspinu on a more intelligent way handle ns evaluation. See our discussion in #956.

vspinu added a commit to vspinu/cider that referenced this issue Feb 1, 2015
bbatsov added a commit that referenced this issue Feb 1, 2015
[Fix #950] Check for existence of ns in `cider-interactive-eval`
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

4 participants