Fork me on GitHub
#cider
<
2019-04-08
>
bozhidar06:04:28

@hoppy Hard to say without the full stacktrace.

yuhan08:04:02

dealing with serious Java interop for the first time.. is there any way to get info about class constructors etc.?

jumar08:04:05

reflect may be useful; see https://stackoverflow.com/questions/5821286/how-can-i-get-the-methods-of-a-java-class-from-clojure I sometimes use something like this:

(->> (clojure.reflect/reflect "") :members (sort-by :name) (clojure.pprint/print-table [:name :flags :parameter-types :return-type]))

jumar08:04:28

Where you replace "" with your object.

yuhan08:04:18

hmm, so there's nothing built into Cider's tooling that helps with this?

yuhan08:04:37

eg. when cursor is in (java.awt.Dimension. ) I'd like the minibuffer to show something like

java.awt.Dimension.: ([] [^int width ^int height] [^java.awt.Dimension d])

yuhan08:04:56

currently having to switch back and forth between the online documentation, I'm surprised this doesn't exist in some way

yuhan08:04:42

eldoc just says [args*] and cider-doc doesn't show anything useful

alexyakushev10:04:49

@qythium You can also inspect the class, it will list the constructors and methods

alexyakushev10:04:57

@bozhidar @cichli I become progressively more annoyed with how the recent changes to printing/recentering in the REPL buffer behave. My scroll-conservatively is set to 101 by the way. Are you sure this feature is properly baked? I would rather opt out of this, to be honest.

alexyakushev10:04:47

Look how after the pause the cursor will not to scroll the new output. This happens if the first output moves the previous prompt precisely to the beginning of the screen.

yuhan11:04:03

Yeah I realise I can inspect everything via reflection, the question was more about the editor integration

yuhan11:04:30

eg. Cider already shows variadic class method arglists using Eldoc, so extending that to constructors shouldn't be that much of a stretch?

bozhidar16:04:15

@alexyakushev I haven’t tested the fallback to the old behaviour to be honest, so I can’t really say. For me the new default always worked reasonably well.

bozhidar16:04:43

I’d suggest filing a ticket for this, as I’m pretty busy this week, so I won’t be able to debug this soon.

bozhidar16:04:58

> eg. Cider already shows variadic class method arglists using Eldoc, so extending that to constructors shouldn’t be that much of a stretch?

bozhidar16:04:10

I thought we had already done this. If not - it shouldn’t be hard.

👍 1
alexyakushev16:04:16

> I’d suggest filing a ticket for this, as I’m pretty busy this week, so I won’t be able to debug this soon. It just seems to me that problems like this one, and the one I had before, are ducttape-patched, so they will keep on showing.