Closed emkayonline closed 12 years ago
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?
-Steve
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,
Martin
@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.
Thanks
Martin
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:
Then who-calls works again with swank-clojure,
Martin