Small issue with swank-cdt on Windows

25 views
Skip to first unread message

Aravindh Johendran

unread,
May 11, 2011, 11:12:11 AM5/11/11
to Clojure, george-...@blackbirdsystems.net
Swank cdt is unbelievably awesome and many thanks for the superb
effort!

On windows with swank-clojure 1.4.0-SNAPSHOT, there seems to be a
small issue with displaying source once a breakpoint is hit.
I get a message saying "clojure\set.clj - source not found". Digging
into swank source, the method swank.commands.basic/source-location-
for-frame seems to be where the problem is, specifically the line -
(str ns-path File/separator (.getFileName frame))

In window, java.io.File/separator returns "\\" . However, in the
method slime-find-resource, the separator is going to cause a
failure ........

user=> (.getResource (clojure.lang.RT/baseLoader) "clojure\\set.clj")
nil

user=> (.getResource (clojure.lang.RT/baseLoader) "clojure/set.clj")
#<URL jar:file:/C:/Users/ajohendran/.m2/repository/org/clojure/clojure/
1.2.1/clojure-1.2.1.jar!/clojure/set.clj>
user=>

http://download.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html#getResource(java.lang.String)

Can we just use the forward slashes in the method source-location-for-
frame?

Thanks
Aravindh

George Jahad

unread,
May 12, 2011, 11:24:18 AM5/12/11
to Clojure
On May 11, 8:12 am, Aravindh Johendran <ajohend...@gmail.com> wrote:

> Can we just use the forward slashes in the method source-location-for-
> frame?

Seems reasonable. Thanks for pointing it out. I'll fix it in the
next snapshot.

g
Reply all
Reply to author
Forward
0 new messages