Fork me on GitHub
#cursive
<
2019-03-01
>
genekim05:03:36

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).
null

; ^^^ 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).
null

; ^^^ 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

genekim02:03:01

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

dmarjenburgh09:03:36

Navigate -> Namespace can find it

boris14:03:30

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.

serioga19:03:03

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

cfleming19:03:24

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.

cfleming19:03:26

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

helios08:03:00

thanks! 🙂

cfleming19:03:51

@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?

cfleming19:03:49

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

cfleming19:03:48

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

cfleming19:03:53

@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?

butterguns20:03:11

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

butterguns20:03:20

No Java hints?

dnolen20:03:08

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