Fork me on GitHub

Strange issue, not urgent, but wanted to let you know: I was walking Mike Nygard through a problem I was having with an oddly terse error message — it turns out that it was because I was using expound, which ghostwheel pulled in (a fantastic runtime static-type checker, which I love using.) But he noticed that I was getting different errors, based on whether I was sending form using "Send Top Form to REPL" via keyboard accelerator, or manually typing it in.

(compare-foundation-with-rest "" rows :mttr)
Syntax error (NullPointerException) compiling at (twodots_foundation.clj:245:10).

; ^^^ error from "Send Top Form to REPL"
; this line number is the form that was sent, so not very helpful -- a very long
; distance from where the exception was thrown

(compare-foundation-with-rest "" rows :mttr)
Execution error (NullPointerException) at analyze.twodots-foundation/ttest-lower? (twodots_foundation.clj:117).

; ^^^ manually typed in REPL window
; this is the actual line number where the exception was thrown

Alex Miller (Clojure team)13:03:57

Not sure exactly what the cause is but I’m sure you’ve ended up with different levels of nested exceptions. Looking at *e would probably be helpful to compare the chains

Alex Miller (Clojure team)13:03:37

As of 1.10 we unpeel the top layers of the exception stack for a runtime exception till we find something outside core, which is probably why the repl error is better


Thanks @U064X3EF3 !!! I think you're right on — I do recall seeing multiple exception messages! (The lesson for me: *e is your friend. I never actually used it until last week!)

Yehonathan Sharvit07:03:25

Is Cursive able to find a namespace that has a dash character in it? With Shift-Shift, it doesn’t work for me


Navigate -> Namespace can find it


Oh wow why isn’t namespace lookup part of the shift-shift menu? Would be neat if that was possible. Anyway because I don’t see namespaces in shift-shift, I usually omit the dashes.


If you enter search term like my namespace with dashes using space as separator then IDEA will find corresponding file name.


If someone could file an issue for that, I’ll look at it - that should definitely work and there’s clearly something wrong with it.


@helios The main change in recent Cursive versions is that it now allows recent versions of lein. If you haven’t explicitly selected the lein version you want you’ll get the latest one. There’s some churn going on with lein and nREPL at the moment as everyone switches over to the new nREPL, what you’re seeing is a result of that. When you upgrade Cursive, you can either specify an older version of lein at Preferences | Build, Execution, Deployment | Build Tools | Leiningen | Project Settings, or you can figure out what needs upgrading in your project to use the new nREPL with lein 2.9.0.


thanks! 🙂


@dnolen That should be a thing - you should be able to ctrl-click on a keyword defining a spec and it will take you there. Or did you mean something more like “Go to file/namespace/class” etc?


@mattmorten Re: JS type hints, yes, I’d like to do more with that. In fact, that case you’re showing is pretty simple to support.


@mattmorten Cursive uses the profiles that you define in the lein toolwindow under the Profiles subtree - you can select them.


@viebel re: the namespace searching, I think the problem is that namespaces don’t show up in the Shift-shift seach. Packages do, which is why you’re seeing the wrong name there.

Yehonathan Sharvit16:03:09

Is there a way to search a function through its fully qualified name?


Thanks for your response. JS type hints? So, CLJS only?


No Java hints?


@cfleming hrm that doesn't work for me? what do I use in the context menu?