Fork me on GitHub
#cider
<
2019-01-15
>
manuel07:01:16

@bozhidar FYI: moved cider-nrepl dependency from 0.20.0-SNAPSHOT to 0.20.0. All good here. (`deps.edn` + shadow-cljs project, by the way)

manuel07:01:30

thanks for the release 😉

bozhidar08:01:54

You’re welcome!

bozhidar08:01:07

And yeah - CIDER 0.20 is out! (https://metaredux.com/posts/2019/01/15/cider-oslo.html) Enjoy!

❤️ 3
dominicm10:01:48

@bozhidar does the new pretty printing use the same API as cider did? Or do I need to send a patch to fireplace?

bozhidar10:01:42

Basically now it’s printer instead of pprint-fn and print-options instead of individual keys for *print-length* and so on.

bozhidar10:01:20

The print options are specific to the printer that’s being used. CIDER doesn’t set any by default and assumes the users know how to configure their favourite print engine.

bozhidar10:01:20

Also - the old middleware returned a special response, now we’re directly pretty-printing the :value key, which simplifies a lot dealing with pretty-printed values.

bozhidar11:01:20

The old keys are simply ignored, although we can also have the middleware just translate them.

bozhidar11:01:30

I was short on time, so I didn’t fret on this too much.

bozhidar11:01:43

Ah, I just remembered why I didn’t do it - the old API assumed printing to a stream, the new assumed printing to a string.

bozhidar11:01:11

We’ll likely revisit it once @cichli implements streaming of values for nREPL.

tatut11:01:18

Is there a browse spec at point to show documentation of a keyword’s spec that is under the cursor?

tatut11:01:58

cider-browse-spec doesn’t seem to understand ns aliases in the current ns

tatut11:01:13

I’m not very familiar with cider internals, but I would be interested in patching it

dominicm12:01:07

@bozhidar I suppose cider doesn't bring along any pprinters, so if you want to use zprint, you will need to add it (and potentially mr. anderson it) yourself.

manuel12:01:53

@dominicm I added it as a dependency on my project and configured cider-pprint-fn in .dir-locals.el.

dominicm12:01:44

@manuel that doesn't work if you want your printer to work in multiple projects. I generally try to prevent personal choices, like the printer, ending up in project specific configuration.

manuel12:01:28

I see what you mean

dominicm12:01:45

I also don't have the option for a dir locals, as vim doesn't have a practical equivalent. Especially not one that a plug in would depend on for a setting to be useful.

dominicm12:01:14

Also, if those dependencies ever conflict with those of your project, things will break. This is why cider inlines dependencies.

stathissideris13:01:38

when cider connects to deps projects (jack-in), how do I tell it to use the :dev profile? is this the best way? (setq cider-clojure-cli-global-options "-A:dev")

stathissideris13:01:14

oh maybe .dir-locals is the answer to that?

orestis14:01:41

Yeah I’m using .dir-locals @stathissideris — or used to, I’m now starting my nrepl in a terminal and have CIDER connect to it. Saves me the bother 🙂

stathissideris14:01:12

@orestis thanks, I just tried dir-locals and they work as expected!

tjg14:01:04

Last night I discovered a conflict between figwheel-sidecar vs CIDER, because of conflicting nrepl vs tools.nrepl dependencies. Does combining figwheel-sidecar & CIDER probably require me submit a pull request to figwheel-sidecar that somehow removes the tools.nrepl dependency?

tjg14:01:36

(Or perhaps there's a deeper issue, once that's solved...)

dpsutton14:01:21

what is figwheel-cider? Do you mean figwheel-sidecar?

tjg14:01:48

Oops, let me edit my typo, was up late 😛

tjg14:01:16

Yes, figwheel-sidecar 🙂

dpsutton14:01:28

what version are you on? I've been running 0.5.18 with no problem

dpsutton14:01:18

yeah bump your figwheel deps to 0.5.18

tjg14:01:48

Yowza, that did the trick perfectly! Thanks @dpsutton! (Could've sworn I looked at figwheel-sidecar's sourcecode on the proper branch, but guess I missed something)

dpsutton14:01:11

no worries. this stuff gets tricky with the upgrade to nrepl/nrepl

bozhidar16:01:40

> @bozhidar I suppose cider doesn’t bring along any pprinters, so if you want to use zprint, you will need to add it (and potentially mr. anderson it) yourself.

bozhidar16:01:21

@dominicm It actually brings three in the cider.pprint namespace, but I hope this is going to be a temporary measure.

bozhidar16:01:08

Puget would work as a normal dep, as it has a function to print to string, but for clojure.pprint and fipp I had to write simple wrappers to easy the lives of the end users.

bozhidar16:01:00

This won’t be necessary if we really implement stream printing, though.

macrobartfast16:01:22

is there a quick way to search for and jump to a symbol definition across a project, either with, I guess, cider or emacs?

bozhidar16:01:01

Have you tried M-.?

macrobartfast16:01:00

I have now! thanks! works perfectly... didn't realize it would go across files.

bozhidar17:01:30

Magic 😉

1
madstap17:01:10

When using cider with lein, when I do cider-jack-in it'll use the :repl profile where I can add extra deps and stuff. How do I accomplish the same with deps.edn ?

dpsutton18:01:20

((nil
  (cider-clojure-cli-global-options . "-A:fig")))
@madstap i think this is what you are looking for

madstap18:01:14

I put that in .dir-locals.el, right?

dpsutton18:01:58

yes. sorry 🙂

madstap18:01:15

If I've already got a .dir-locals.el containing

((nil . ((cider-refresh-before-fn . "integrant.repl/suspend")
         (cider-refresh-after-fn  . "integrant.repl/resume"))))
I'd add that like this?
((nil . ((cider-refresh-before-fn . "integrant.repl/suspend")
         (cider-refresh-after-fn  . "integrant.repl/resume")
         (cider-clojure-cli-global-options . "-A:fig"))))

madstap18:01:19

Also, you didn't put a . between nil and the list, is that significant somehow?

dpsutton18:01:03

no idea ¯\(ツ)

dpsutton18:01:26

but it seems to work. i need to look into an authoritative source on dir locals

madstap18:01:58

Yeah, I need to go through some tutorials so I can start reasoning about this stuff instead of cargo culting everything. Thanks a lot for the help 🙂

macrobartfast20:01:36

well, dang. I just discovered hydra-cljr-project-menu/cljr-add-project-dependency ... is this a viable alternative to alembic?

macrobartfast20:01:30

at the very least, it seems like it will conveniently add a dependency to my project.clj, which is great. the hot reload ('hd') from the minibuffer menu produces a java 10 related error, but plunging on.

macrobartfast20:01:53

trying new libraries during exploratory coding has required a lot of web-search->clojars->project.clj-updating->repl-restarting which is a flow breaker, so trying faster routes.

macrobartfast20:01:31

alembic has been handy, but seems at times to fail more often than I'd like, which is a flow disrupter as well.

macrobartfast20:01:38

but getting: "error in process filter: Temporarily disabled until a solution for java 10 is found."

macrobartfast20:01:14

also, the fuzzy finding of libraries isn't working.

macrobartfast20:01:05

it looks like I need to update clj-refactor.

macrobartfast20:01:58

or not. bummer, hot reload doesn't work to enable java 10 (which I do not have installed). do any of you have a dependency install/hot-reloading strategy?

arohner23:01:49

After upgrading to 0.20.0, a few cider methods seem to be missing. When I C-h f cider-mode, functions such as M-., cider-find-var aren’t underlined, indicating the key binding is defined but the fn is not. Where should I start looking?