cider

A channel dedicated to the Clojure Interactive Development Environment that Rocks (aka CIDER). :cider:
dpsutton 2021-04-15T00:00:23.287100Z

> 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

blak3mill3r 2021-04-15T00:01:49.288100Z

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

bozhidar 2021-04-15T07:23:14.292900Z

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

blak3mill3r 2021-04-15T00:02:36.288700Z

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

Elso 2021-04-15T07:07:25.292Z

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

yuhan 2021-04-15T07:19:14.292100Z

Looks like the Spacemacs command is calling the function wrongly

yuhan 2021-04-15T07:21:04.292300Z

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

bozhidar 2021-04-15T07:21:18.292500Z

And CIDER never used this API. 🙂

bozhidar 2021-04-15T07:21:43.292700Z

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

bozhidar 2021-04-15T07:24:20.293700Z

@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

Elso 2021-04-15T07:24:43.294400Z

👍 thanks for the info

bozhidar 2021-04-15T07:25:59.295700Z

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.

yuhan 2021-04-15T07:27:15.296900Z

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

bozhidar 2021-04-15T07:27:33.297300Z

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.

Elso 2021-04-15T07:30:02.297900Z

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

bozhidar 2021-04-15T09:06:50.299200Z

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

👀 1
bozhidar 2021-04-15T09:07:36.300200Z

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. 😄

👍 1
jmckitrick 2021-04-15T11:30:06.300800Z

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