Fork me on GitHub
#cider
<
2018-02-14
>
gganley00:02:37

I believe so, I’ll look at http://cider.readthedocs.io

gganley00:02:45

Unfortunately I don’t know how to help you from here. Clearly it loads dir-locals when it loads cider-repl-mode but from there I don’t know

dpsutton00:02:28

@ghadi what are you trying to do?

dpsutton00:02:08

Cider reads the port that nrepl is listening on from the output so it doesn't need to be configured.

dpsutton00:02:45

it looks like there's

(defcustom cider-lein-parameters
  "repl :headless :host ::"
  "Params passed to Leiningen to start an nREPL server via `cider-jack-in'."
  :type 'string
  :group 'cider
  :safe #'stringp)
where you could maybe specify a port? not really sure about advanced startup stuff like that but if so CIDER will see the value

bozhidar04:02:59

@ghadi For cider-jack-in or cider-connect?

benedek08:02:33

@arrdem @wiseman there used to be when sorting was done in elisp. I don't think it is configurable in the newer versions. feel free to file an issue or do a PR tho I would not mind at all to resurrect the feature

andrea.crotti11:02:37

mm just restarted my emacs and getting

andrea.crotti11:02:15

a recursive require just by doing simply (require cider)

andrea.crotti11:02:45

moved back to melpa-stable in the meanwhile, should I raise an issue on github (unless it's something trivially wrong with my setup somehow, seems strange that such a problem could go undetected)

jumar12:02:10

Do you guys have a reasonable workflow when dealing with 3rd party java libs in Emacs/Cider? I mean jumping to the java source files and, perhaps, showing the docstrings.

jumar12:02:10

Do you guys have a reasonable workflow when dealing with 3rd party java libs in Emacs/Cider? I mean jumping to the java source files and, perhaps, showing the docstrings.

jumar12:02:40

I'm mostly interested in exploration part - quickly going to the source of the java class and perhaps showing the javadoc.

jumar12:02:38

I tried to add "sources" artifact to the project.clj but cider still cannot reliable find the source file (using jump-to-definition). One good example is https://www.ldap.com/unboundid-ldap-sdk-for-java I can use cider-open-classpath-entry to list contents of "*sources.jar" and navigate to the class but that's not very comfortable. Also, I need to add sources jar to the dependencies for every java lib on the classpath if I want to look into its source files.

jumar12:02:10

I think that Cursive/IDEA is much better in this case, but I got so used to Emacs/Spacemacs that I have a hard time to switch back 🙂

dominicm14:02:30

There is a lein plugin which fetches all of the source versions of jars.

bozhidar16:02:16

If the source of some artefact is the classpath the source lookup is going to work in CIDER. It’s as simple as that.

jumar19:02:11

@U051BLM8F well my experience is somewhat different. It doesn't seem to work reliably. Moreover, I was asking if that's something the other guys really use because it seems to be a bit tedious. @U09LZR36F I guess you're talking about https://github.com/puppetlabs/lein-ubersource - I'll try that!

jumar19:02:33

btw. one variant that I've tried was to add it as a dependency to :repl profiles:

:repl {:dependencies [[com.unboundid/unboundid-ldapsdk "4.0.0" :classifier "sources"]]}
I guess that should be it. It's definitely visible in the output of cider-open-classpath-entry and I can navigate to the class manually. However, cider (at least in my configuration - more or less standard spacemacs) doesn't seem to be able to jump to most of the definitions (e.g. LDAPConnectionPool class from that artifact)

jumar19:02:09

Ad lein-ubersource plugin: it seems that it's useful mostly for manual grep through all the java sources. I don't immediately see how to use it to automatically add all source jars to the classpath.

jumar19:02:40

I will check it out - thanks!

dpsutton15:02:56

@andrea.crotti someone had this same issue and it turned out they had reference to cider-profile. This was recently absorbed into CIDER and now createsa circular reference. Try that and I think you'll be fine

bbrinck15:02:57

cider-eval-last-sexp is super valuable, but when I encounter threading macros like ->, I find I need to refactor my code into nested sexps to use cider-eval effectively. Is there a way to eval parts of a threading macro or display the results after each step, somewhat like https://github.com/JoshCheek/seeing_is_believing ?

bbrinck15:02:23

Or do people have other strategies for interactively inspecting the results of threading macros?

bhauman16:02:08

It's probably easier to create a script that launches nrepl than to attempt connecting cider to a Socket Repl correct?

bhauman16:02:26

i'm trying a clojure cli tool only setup

ghadi16:02:39

I was doing this for coworkers for clj + cider:

ghadi16:02:46

#!/bin/bash
clj -A:cider:test - <<EOM
(require 'cider-nrepl.main)
(cider-nrepl.main/init ["cider.nrepl/cider-middleware"])
EOM

ghadi16:02:09

(where the cider alias had the dependencies listed)

bhauman16:02:09

well dang son that's what I was looking for

ghadi16:02:24

you'll need 0.17-snapshot i think

bhauman16:02:56

16 should work right?

bhauman16:02:02

its just nrepl

ghadi16:02:16

i don't know. i don't think it has the cider-nrepl.main namespace

bhauman16:02:41

makes sense

ghadi16:02:43

it's certainly possible to do it in 0.16 -- just need to change the code a bit

bhauman16:02:43

thanks much

dpsutton16:02:14

and i was asking about lein. should have known 🙂

bozhidar16:02:44

> It’s probably easier to create a script that launches nrepl than to attempt connecting cider to a Socket Repl correct?

bozhidar16:02:17

@bhauman You can just see what we’re using in 0.17 for deps.edn cider-jack-in

bhauman16:02:52

That's good to know!

bozhidar16:02:56

> It’s probably easier to create a script that launches nrepl than to attempt connecting cider to a Socket Repl correct?

bozhidar16:02:42

Yeah, the socket repl support is a work in progress, which is going on very slowly due to lack of someone with the time to do the necessary refactorings.

bhauman16:02:07

it's not a big deal to me, I was just looking for the simplest way

bozhidar16:02:33

@andrea.crotti @dpsutton is right. Just remove the old cider-profile package you’ve installed at some point.

arrdem19:02:46

@benedek cool! thanks for the answer. I may take a pass at it later, although seems like some of the stdlib / 1stparty / 3rdparty bits would be hard to infer

dpsutton22:02:55

If you're going to clojure sync I'm trying to organize an into to contributing to cider. Check #cider in the slack for the conference

gonewest81823:02:19

@dpsutton can you get someone to record that session for those who can’t be there?

dpsutton23:02:37

don't think its gonna be a session. more an unsession.

dpsutton23:02:46

hoping to get more people to work on http://www.hackingcider.com

dpsutton23:02:38

i'm just going over with a few interested people how to debug, how to start working on it, general layout etc

dpsutton23:02:46

hoping that we have some new collaborators soon