Fork me on GitHub
#cider
<
2022-10-12
>
eggsyntax13:10:03

Anyone else have trouble navigating to code in a .jar dependency? I can pull up documentation for a function in a dependency with spacemacs/evil-smart-doc-lookup, and the *cider-doc* buffer shows the jar file location (`jar:file:/root/.m2/repository/...`) at the bottom, but if I put the cursor over it and press return, I get "user-error: Can’t find the source because it wasn’t defined with ‘cider-eval-buffer’". Pretty sure that used to work for me -- anyone have a clue why it wouldn't now? The project I'm in switched fairly recently from lein to deps.edn, and I wonder whether that might be related.

vemv15:10:09

> Can’t find the source because it wasn’t defined with ‘cider-eval-buffer’ that's an odd thing to say. Have you grepped which .el code is saying this?

eggsyntax16:10:57

Yeah, the message shows up in both https://github.com/clojure-emacs/cider/blob/master/cider-xref.el#L90-L104 and https://github.com/clojure-emacs/cider/blob/master/cider-doc.el#L231-L245 and I'd guess it's the latter. A colleague suggested they might not be honoring cider-path-translation, which seems plausible (I do use it because we're running in docker). In any case it turns out that I can get there with evil-goto-definition (or xref-find-definitions) so fortunately it's not a blocker. Will hopefully find time to file an issue later. Thanks!

vemv16:10:44

yeah the error message is somewhat confusing. It should say instead "Can't find the source because it wasn't defined with cider-eval-buffer or otherwise found"

eggsyntax16:10:34

I was a bit baffled when I saw it 😆

clojure-spin 1
vemv16:10:47

cider-path-translation is a good lead yeah. Honestly over the years I've learned to run the JVM locally and the services within Docker. it might not satisfy purists but life is simply better that way :)

👍 1
Alex Miller (Clojure team)16:10:50

^^ in case anyone can help there