Fork me on GitHub
#cider
<
2021-04-15
>
dpsutton00:04:23

> given that elisp is turing complete, but it’s probably a decent amount of work lol that is a huge understatement. Just reimplement Idea in elisp haha

blak3mill3r00:04:49

that is pretty cool... I know I remember cider having some kind of jump-to-java support that I had working a while ago, with Java 1.8 and an older clojure. It only worked with certain jars though (`tools.jar` distributed with the jdk and clojure.jar) and I guess the java source code was included with the jars or cider knew how to find them

bozhidar07:04:14

Yeah, changes in JDK 9 and dynapath kind of broke this. It will be fixed soon after being broken for quite a while.

blak3mill3r00:04:36

was a nice feature... it stopped working for me at some point and I didn't miss it enough to dig into it

Elso07:04:25

I'm having issues with find-var since the latest cider update, but I'm struggling to make sense of the error message:

Debugger entered--Lisp error: (wrong-number-of-arguments (1 . 1) 0)
  xref-find-definitions()
  (if (and (cider-connected-p) (cider-var-info sym-name)) (if (eq (quote symbol) (type-of (cider-find-var nil sym-name))) nil (xref-find-definitions)) (xref-find-definitions))
  spacemacs/clj-find-var("ring.middleware.defaults")
  funcall-interactively(spacemacs/clj-find-var "ring.middleware.defaults")
  call-interactively(spacemacs/clj-find-var nil nil)
  command-execute(spacemacs/clj-find-var)
what happened here? did xref-find-definitions just change its signature? where does this come from? I guess this is probably a version mismatch, but I'm uncertain how to resolve it properly

yuhan07:04:14

Looks like the Spacemacs command is calling the function wrongly

yuhan07:04:04

I just checked the source, xref-find-identifer hasn't changed since 2014

bozhidar07:04:18

And CIDER never used this API. 🙂

bozhidar07:04:43

(which is something that people often complain about, but it’s unrelated to the problem at hand)

Elso07:04:43

👍 thanks for the info

yuhan07:04:15

@UU5KDUCBT submit an issue/PR to Spacemacs if you can, I don't use it

Elso07:04:02

will do if it turns out to be an actual issue, still trying to figure out how this came about though, because it used to work and it seems like quite the obvious bug to just introduce like that

bozhidar07:04:20

@jmckitrick It’s funny you mentioned this just now, as recently @vemv has been helping to fix this https://github.com/clojure-emacs/orchard/issues/113

bozhidar07:04:59

CIDER has (almost) aways supported this functionality, but it could add only the JDK sources automatically itself (and this broken in JDK 9 due to changes related to the new module system that affected dynapath). For the rest of the sources - I guess the majority of the people don’t realize that they have to add them to the classpath in whatever way they prefer.

bozhidar07:04:33

Anyways, soon we’ll remove the legacy classpath manipulation logic from Orchard completely and we’ll promote a tool built by @vemv to setup the sources conveniently. It won’t match the experience created by @cfleming, but I think it will be enough for the needs of most of people.

bozhidar09:04:50

And in case someone’s interested - here’s the Java source parser that we’ve developed for CIDER and friends https://github.com/clojure-emacs/orchard/blob/master/src/orchard/java/parser.clj

👀 3
bozhidar09:04:36

As you can see it requires JDK 9+ and we have a different parser for JDK 8. This painful transition between JDK8 and 9 made me appreciate the stability of Clojure more than ever. 😄

👍 3
jmckitrick11:04:06

@bozhidar Well, that's perfect timing! Is there anything I can do to help?