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 alias in keyword stops debug working #2039

Closed
tcoupland opened this issue Jul 10, 2017 · 3 comments
Closed

Namespace alias in keyword stops debug working #2039

tcoupland opened this issue Jul 10, 2017 · 3 comments

Comments

@tcoupland
Copy link

Expected behavior

All three functions should debug

Actual behavior

The third call doesn't.

Steps to reproduce the problem

(ns other)
(ns scratch)
(alias 'o 'other)

#dbg
(defn debugs
[r]
(inc (:n r)))

#dbg
(defn debugs-2
[r]
(inc (:other/n r)))

#dbg
(defn no-debug
[r]
(inc (::o/n r)))

(debugs {:n 1})
(debugs-2 {::o/n 1})
(no-debug {::o/n 1})

In a cider-scratch buffer as you compile you can see the third function doesn't get treated like the others, running each call make's it clear the third has not had the breakpoints inserted.

Environment & Version information

CIDER version information

;; Connected to nREPL server - nrepl://localhost:42887
;; CIDER 0.15.0snapshot (package: 20170705.951), nREPL 0.2.12
;; Clojure 1.9.0-alpha13, Java 1.8.0_121

Lein/Boot version

lein version
Leiningen 2.7.1 on Java 1.8.0_121 Java HotSpot(TM) 64-Bit Server VM

Emacs version

GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.10) of 2017-04-22

Operating system

uname -r
4.11.9-1-ARCH

@vspinu
Copy link
Contributor

vspinu commented Jul 15, 2017

It's namespace related. Reading in the debugging is not done in requested namespace.

Thrown in the debugger:

#error {
 :cause Invalid token: ::o/n
 :via
 [{:type java.lang.RuntimeException
   :message Invalid token: ::o/n
   :at [clojure.lang.Util runtimeException Util.java 221]}]

It's essentially as if doing:

::undefined/n

There are number of ns related issues in the debugger. Will have a look at all of them when I have time.

@expez
Copy link
Member

expez commented Jul 16, 2017

Duplicate

#2004
clojure-emacs/cider-nrepl#420

@expez expez closed this as completed Jul 16, 2017
@vspinu
Copy link
Contributor

vspinu commented Aug 7, 2017

@expez, strictly speaking this one is not a duplicate. It concerns the debugging definition while others concern evaluation during the debugging. While similar, fixes should be applied in different places.

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

3 participants