Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to jump to clojure.lang java source?

When using Cider, doing "M-." above symbol "clojure.lang.ISeq" gives error "No source available for clojure.lang.ISeq".

I see that the source for this file is in "clojure-1.5.1-sources.jar".

How can I make Cider see this source?

like image 917
newbie3000 Avatar asked Nov 14 '14 02:11

newbie3000


1 Answers

ISeq is a java interface that every seq-able collection in clojure implements. Thus you can't get the source by issuing a (source var). To get to the source you have to peruse the Clojure repo on GitHub. The idea is that the underlying java code that powers Clojure is an implementation detail, therefore it's not designed to be exposed to the users of the language. It's perfectly fine to look at it, but you have to do some digging. You can verify this by eval-ing (javadoc clojure.lang.ISeq).

like image 158
Ricardo Acuna Avatar answered Nov 05 '22 04:11

Ricardo Acuna