Fork me on GitHub
#cider
<
2020-08-03
>
mafcocinco02:08:42

I’m sorry for the lack of technical details WRT this question, but I’m kind of stumped. Under a standard configuration of CIDER, what is the difference, if any between launching a REPL via cider-jack-in vs. launching it from a terminal window with lein repl. The reason I ask is that I’m building a Clojure client library for FoundationDB and when I launch my REPL using lein repl from a terminal window, the classes from the FoundationDB java library load without a problem. However, when I try to load those same classes via the CIDER REPL, I get a NoClassDefFound exception when trying to use one of the imported classes (`com.apple.foundationdb.FDB`). The import works correctly but, implying the name is present. The error does not occur until I try to use the class. Just looking for some general guidance one where to look/ideas for debugging as my FoundationDB configuration appears to be correct (works from the terminal REPL) and I’m not really sure what to try next WRT debugging the REPL configuration within CIDER.

mafcocinco02:08:03

One other note, I check to see if there was a difference in classpath between the 2 REPL instances and there was not.

dpsutton02:08:16

When you cider jack in it should print the startup command at the top of the repl. Try identical steps from “lein repl “ and then the version cider spits out

mafcocinco03:08:40

Great suggestion, tried it and works from the terminal, still not working from CIDER.

mafcocinco03:08:27

Found a work around with cider-connect. Since the process is working in my terminal with an nREPL running, I just pointed CIDER to that instance and it appears to be working fine. A little extra setup for this specific project, but it works!

dpsutton03:08:24

Is this open source?

dpsutton03:08:44

I’d be interested in a minimal repro

mafcocinco03:08:52

it is not but I’ll see if I can get a minimal OSS repo for you this week.

dpsutton03:08:53

That would be great

bozhidar14:08:52

CIDER 0.26 (Nesebar) and nREPL 0.8 are out! More details - https://github.com/clojure-emacs/cider/releases/tag/v0.26.0 and https://metaredux.com/posts/2020/06/15/nrepl-0-8-evolving-the-protocol.html Special thanks to Clojurists Together for their support and to all the contributors for their help! Cheers! cider

cider 5
🍻 1
richiardiandrea19:08:25

Hi there, long time no see in this channel 😄 (the trend might change) I was wondering if cider has an option to stop asking for symbol to document on C-c C-d d - most of the times I want to ask for doc at point

dpsutton20:08:17

@richiardiandrea

(defun cider-prompt-for-symbol-function (&optional invert)
  "Prompt for symbol if funcall `cider--should-prompt-for-symbol' is truthy.
Otherwise attempt to use the symbol at point for the command, and only
prompt if that throws an error.

INVERT is used to invert the semantics of the function `cider--should-prompt-for-symbol'."
  (if (cider--should-prompt-for-symbol invert)
      #'cider-read-symbol-name
    #'cider-try-symbol-at-point))

richiardiandrea20:08:43

awesome, sorry I got lazy 😄

richiardiandrea20:08:49

thank you very much

richiardiandrea20:08:14

aaaand the defcustom is cider-prompt-for-symbol

parens 1
bozhidar08:08:03

That's one default I will probably change at some point. Originally it wasn't prompting, someone pointed out that most similar command in Emacs were prompting and we needed to be consistent with them, so that's how we ended up here. I still don't see much value in the current default, though. I just got used to it. 🙂

yuhan02:08:14

for what it's worth, both Spacemacs and Doom set that variable to nil as a "sensible default"