简体   繁体   English

如何跳转到clojure.lang java源码?

[英]How to jump to clojure.lang java source?

When using Cider, doing "M-." 使用苹果酒时,做“M-”。 above symbol "clojure.lang.ISeq" gives error "No source available for clojure.lang.ISeq" . 上面的符号“clojure.lang.ISeq”给出错误“没有可用于clojure.lang.ISeq的源”

I see that the source for this file is in "clojure-1.5.1-sources.jar". 我看到这个文件的源代码是“clojure-1.5.1-sources.jar”。

How can I make Cider see this source? 如何让Cider看到这个来源?

ISeq is a java interface that every seq-able collection in clojure implements. ISeq是一个java接口,clojure中的每个seq-able集合都可以实现。 Thus you can't get the source by issuing a (source var). 因此,您无法通过发出(source var)来获取源代码。 To get to the source you have to peruse the Clojure repo on GitHub. 要获得源代码,您必须仔细阅读GitHub上的Clojure回购。 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. 我们的想法是,为Clojure提供支持的底层Java代码是一个实现细节,因此它并不是为了向该语言的用户公开。 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). 您可以通过evaling(javadoc clojure.lang.ISeq)验证这一点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM