Fork me on GitHub
#cider
<
2018-08-18
>
kwcharllie37914:08:51

Is there a way to jump to Java source code from cider?

dominicm14:08:40

@kwcharllie379 I think step one is to add the source artefacts to your project. I think it works though, you could try jumping to source against some clojure java.

kwcharllie37914:08:24

How can I add them?

dominicm14:08:04

an example of something that I expect would work: java.util.concurrent.ThreadPoolExecutor

kwcharllie37914:08:28

Well it works perfectly with your example but what if I am trying to jump to the source of 3rd party library?

dominicm14:08:54

@kwcharllie379 you add an additional dependency, so say you depend on [foo/bar] there is usually a source jar deployed as well, so you add an additional dependency on [foo/bar :classifier "sources"].

dominicm14:08:44

Sorry, that's sources* not source

kwcharllie37914:08:45

Thank you very much ❤️

kwcharllie37914:08:38

@dominicm Funny thing is that although I can jump to the sources after adding classifier I am receiving the error with not matching ctor. It's funny because without classifier it works as expected. http://central.maven.org/maven2/commons-codec/commons-codec/1.11/

dominicm14:08:30

@kwcharllie379 do you have both?

kwcharllie37915:08:33

Ok sory that’s my bad. You emphasized that it should be an additional dependency.

kwcharllie37915:08:40

Thank you one more time

dominicm15:08:45

@kwcharllie379 that's okay, it's an easy mistake, I quite expected it 😛