who-calls is failing as (:file meta (v)) is full path #101

emkayonline opened this Issue Jan 17, 2012 · 4 comments


None yet
3 participants

In swank.commands.xref/get-source-from-var (.getResourceAsStream) is used to get the source text. However, the result of (:file (meta v)) is a full file path name so the getReosurce is failing.

If the line is changed to:

    (when-let [strm (java.io.FileInputStream. filepath)]

Then who-calls works again with swank-clojure,



purcell commented Jan 17, 2012

Are you looking up a var defined in your own code, or in a jar?

And with your modification, are you still able to query the source of a function for which the source is contained in a jar?


You are right (That also explains my confusion that who-calls has worked occasionally).

Yes, I was looking up who-calls on a var defined in my own code, (for which my modification works), but if I look up a var defined in a jar then your code is needed.

Would it make sense to lookup in the jar, failing that, try and get the stream from the filesystem?

Thanks for your help,


tavisrudd closed this in e8c262b Jan 19, 2012


tavisrudd commented Jan 19, 2012

@emkayonline I just pushed a fix for this. Can you please try it out?

That is great. I've tried vars in my local source and vars in jars and both work well.



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment