-
-
Notifications
You must be signed in to change notification settings - Fork 648
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 error in cider 0.9.0 #1139
Comments
Did you call |
Btw, you should also remove |
I called cider-jack-in on this 'dummy' project. {:user {:plugins [
[lein-try "0.4.3"]
;[lein-ancient "0.6.4" :exclusions [org.clojure/core.cache]]
;[lein-bikeshed "0.2.0"]
;[lein-marginalia "0.8.0"]
;[http-kit/lein-template "1.0.0-SNAPSHOT"]
[cider/cider-nrepl "0.9.0"]
;[cljs-complete "0.1.1"]
;[lein-immutant "2.0.0"]
;[jonase/eastwood "0.2.1"]
;[lein-midje "3.1.3"]
]
:dependencies [
;;[nrepl-inspect "0.4.1"]
[cider/cider-nrepl "0.9.0"]
;;[alembic "0.2.1"]
[org.clojure/tools.nrepl "0.2.10"]
]
}} |
@tokomakoma123 Have a look at the troubleshooting section of the readme. The |
I've set (setq nrepl-log-messages t) in my init.el and obtained info here. (--->
op "clone"
id "1"
)
(<-
id "1"
new-session "cf24d741-342f-44fc-a1eb-c7ae8ad820fa"
session "a77ef47f-1586-4fad-a4cf-c052465eaa9d"
status ("done")
)
(--->
op "clone"
id "2"
)
(<-
id "2"
new-session "c9a12c57-3e77-401d-afb4-316d0a291e71"
session "f76bf398-014f-4115-8b76-aec8b9fb1536"
status ("done")
)
(--->
op "describe"
id "3"
)
(<-
aux (dict
current-ns "user"
)
id "3"
ops (dict
apropos (dict)
classpath (dict)
clone (dict)
close (dict)
complete (dict)
complete-doc (dict)
debug-input (dict)
describe (dict)
eldoc (dict)
eval (dict)
format-code (dict)
format-edn (dict)
info (dict)
init-debugger (dict)
inspect-pop (dict)
inspect-push (dict)
inspect-refresh (dict)
interrupt (dict)
load-file (dict)
ls-sessions (dict)
macroexpand (dict)
ns-list (dict)
ns-path (dict)
ns-vars (dict)
pprint-middleware (dict)
refresh (dict)
refresh-all (dict)
resource (dict)
resources-list (dict)
retest (dict)
stacktrace (dict)
stdin (dict)
test (dict)
test-stacktrace (dict)
toggle-trace-ns (dict)
toggle-trace-var (dict)
undef (dict)
)
session "ed2886ca-0215-4fcd-9fc3-3c4ecf2afe76"
status ("done")
versions (dict
clojure (dict
incremental 0
major 1
minor 6
version-string "1.6.0"
)
java (dict
incremental "0"
major "1"
minor "8"
update "40"
version-string "1.8.0_40"
)
nrepl (dict
incremental "10"
major "0"
minor "2"
qualifier ""
version-string "0.2.10"
)
)
)
(--->
op "eval"
session "cf24d741-342f-44fc-a1eb-c7ae8ad820fa"
code "(str *ns*)"
id "4"
)
(<-
id "4"
ns "user"
session "cf24d741-342f-44fc-a1eb-c7ae8ad820fa"
value "\"user\""
)
(<-
id "4"
session "cf24d741-342f-44fc-a1eb-c7ae8ad820fa"
status ("done")
)
(--->
op "eval"
session "cf24d741-342f-44fc-a1eb-c7ae8ad820fa"
code "(when (clojure.core/resolve 'clojure.main/repl-requires)\n (clojure.core/map clojure.core/require clojure.main/repl-requires))"
id "5"
)
(--->
op "eval"
session "cf24d741-342f-44fc-a1eb-c7ae8ad820fa"
code "(try\n (require 'cider.nrepl.version)\n (:version-string @(resolve 'cider.nrepl.version/version))\n (catch Throwable _ \"not installed\"))"
id "6"
)
(<-
id "5"
ns "user"
session "cf24d741-342f-44fc-a1eb-c7ae8ad820fa"
value "(nil nil nil)"
)
(<-
id "5"
session "cf24d741-342f-44fc-a1eb-c7ae8ad820fa"
status ("done")
)
(<-
id "6"
ns "user"
session "cf24d741-342f-44fc-a1eb-c7ae8ad820fa"
value "\"0.9.0\""
)
(<-
id "6"
session "cf24d741-342f-44fc-a1eb-c7ae8ad820fa"
status ("done")
)
(--->
ns "dummy.core"
op "eval"
session "cf24d741-342f-44fc-a1eb-c7ae8ad820fa"
code "(ns dummy.core)"
id "7"
)
(<-
id "7"
session "cf24d741-342f-44fc-a1eb-c7ae8ad820fa"
status ("namespace-not-found" "done" "error")
)
(<-
id "7"
session "cf24d741-342f-44fc-a1eb-c7ae8ad820fa"
status ("done")
) |
I see the problem. It's trying to evaluate the ns in the ns of the current file instead of This is accounted for here https://github.com/clojure-emacs/cider/blob/master/cider-interaction.el#L1588 What command are you using to eval the ns? (my guess is that we're not invoking |
The cider-eval-buffer(C-c C-k) works fine. 2015-06-18 17:03 GMT+09:00 Bozhidar Batsov notifications@github.com:
|
OK, got it. I see the problem and I'll fix it soon. It's here https://github.com/clojure-emacs/cider/blob/master/cider-interaction.el#L1592 Basically, the order of those checks kind of sucks. The |
Actually, the problem is different - when the prep eval was introduced the special logic to eval |
Btw, this is also @Malabarba's problem - he said a few times he gets "Namespace not found error" in cases when the ns should have been automatically evaluated. That's a pretty serious oversight on our part. I cannot believe more people haven't noticed it. Guess most users just start by doing |
Great ! It worked. |
I am facing a "Namespace not found" error when I evaluate (ns namespace)
after updating cider 0.9.0 from 0.9.0-SNAPSHOT this morning.
It occurred even if in a new project by 'lein new dummy'.
project.clj is very simple like this:
my ~/.lein/projects.cls as follows:
I have eliminated :repl-options from it, the result was the same.
It seems everything is ok except (ns ...) expression and I can continue to use cider by copying and
pasting (ns ...) expression into cider-repl window.
I have tested with cider-20150617.753.
The text was updated successfully, but these errors were encountered: