Fork me on GitHub
#cider
<
2020-01-15
>
didibus06:01:41

It seems that Cider uses snapshot versions of cider/cider-nrepl and refactor-nrepl

didibus06:01:47

Why is that?

dominicm07:01:52

Only if you aren't using it from the stable repo

bozhidar16:01:58

Over the weekend I’ve started working on https://docs.cider.mx/cider/cljs/overview.html (a dedicated section in the user manual for ClojureScript). It’s still in its early stages, but I’ll certainly appreciate any input and contributions from CIDER’s users, who are into ClojureScript development.

cider 16
❤️ 12
aisamu17:01:21

Shadow's section looks great! Might be useful to mention shadow-select (and perhaps suggest it as the default?), since I suspect it's not uncommon to have multiple builds running in parallel (e.g. test + devcards + app, each on a separate page).

bozhidar19:01:56

PRs welcome! 🙂 There’s a lot I want to add to each section, but I’ll have to find some time for this first.

mikerod17:01:57

@didibus @dominicm I don’t use spacemacs, but a lot of people I work with do. I keep seeing them using the melpa latest version instead of melpa stable. Perhaps it’s just default config there - but it seems like it results in them often using a snapshot of cider. wonder if this relates to your version.

dominicm18:01:58

It is the default there

mikerod18:01:14

I think that’s unfortunate. I don’t particularly find a dev environment of all cutting-edge snapshots to be that stable of an experience. Using the latest seems more of something you’d do if you wanted to actively test things to give feedback and/or work on dev.

dominicm19:01:39

Yeah, agree. I've always thought it an odd choice. But all you emacs people are weird vim

😄 4
mikerod19:01:22

Well I don’t use spacemacs but I do use emacs but default to melpa stable

practicalli-johnny22:01:13

Your comments are about a year out of date I believe. You can choose to if you want to a use stable package repository in the .spacemacs config.

mikerod22:01:58

ah, well everyone I’m referring to probably installed prior to this - so that may make sense

mikerod22:01:25

is it documented anywhere where you can have it use stable instead? @U05254DQM ?

practicalli-johnny22:01:38

dotspacemacs-use-spacelpa t in your .spacemacs config file.

practicalli-johnny22:01:08

It has been around since the end of 2017 it seems. (I haven't used the stable package repo myself, as I've not had any issues with Cider snapshots)

practicalli-johnny22:01:28

It maybe that spacelpa is only available on the Spacemacs develop branch, which is very stable itself

mikerod22:01:48

Ah I see. Thanks for the details. When troubleshooting cider things in the past it was just confusing to see them use snaphot versions. And I wasn’t sure how to adjust it to not do that to rule it out.

didibus04:01:03

But, why does nRepl stable uses snapshot?

didibus04:01:26

Cider complains of mismatch version otherwise?

didibus04:01:22

I also find, in practice, latest melpa is better then stable

didibus04:01:22

Since most things you're behind on are bug fixes

didibus04:01:47

I'm not even sure all melpa package ever transition into stable

didibus04:01:08

So sometimes stable means old outdated and buggy

mikerod04:01:47

I didn’t know a stable did or could use snapshot. Hah.

mikerod04:01:05

And your theory on snapshot is interesting. I think it seems unstable to have projects upgrading automatically with every “fix” but perhaps it works well in practice

didibus04:01:09

You might still be right though. It could be unstable cider from melpa telling me to use a weird combo of snapshot and non snapshot for middleware

4
bozhidar09:01:44

> But, why does nRepl stable uses snapshot? I don’t get this. Can you explain what do you mean?

practicalli-johnny12:01:30

Spacemacs can role back any package update. So I have had confidence to update the Emacs packages on a rough monthly basis (or a few days after bozhdar releases more awesomeness from the orchard)

didibus10:01:07

@U051BLM8F I mean:

[nREPL] Starting server via /usr/local/bin/clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} refactor-nrepl {:mvn/version "2.5.0-SNAPSHOT"} cider/cider-nrepl {:mvn/version "0.23.0-SNAPSHOT"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]'

didibus10:01:54

Here nrepl 0.6.0 is used with snapshot versions of the middleware

bozhidar10:01:35

Well, that’s simply because we don’t need anything from the snapshot nREPL at this point.

bozhidar10:01:55

Occasionally the versions of the middleware on the dev branch would be non-snapshot as well.

didibus10:01:59

Hum, okay, and what about this warning:

WARNING: CIDER 0.24.0-snapshot requires cider-nrepl 0.23.0-SNAPSHOT, but you're currently using cider-nrepl 0.22.4. The version mismatch might break some functionality!
         More information.WARNING: No Clojure project was detected. The
refactor-nrepl middleware was not enabled. (You can mute this
warning by customizing `cljr-suppress-no-project-warning'.)

didibus10:01:59

Though I think I just got it. CIDER 0.24.0-snapshot is the Emacs package ?

didibus10:01:21

So it means my Emacs package is not in sync with my Clojure dependency on cider-nrepl ?

practicalli-johnny15:01:57

@didibus the error message you get is usually because you have versions of these libraries in your project. This is usually experienced when using cider-connect rather than cider-jack-in , as jack-in pushes the right version of libraries in the command line. So its usually something adding an older version in your project or build tool (Clojure CLI, Leiningen profie, etc.). The other possibility is that it is clj-refactor as I am running the same version of Cider as you and do not have the same error when running ckder-jack-in

Startup: /usr/local/bin/clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.23.0-SNAPSHOT"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' 
I dont know if clj-refactor has a dependency on an older version that it is pulling in. It seems strange if so, but that is the only think I can think of from the information you have provided so far.

ognen.ivanovski21:01:35

Hi everyone. Does anyone experience this behavior: • jacked into cider • type few spaces within a form before the closing bracket • wait just under a second • the form is automatically reformatted (spaces removed) If one quits the cider session, this behavior is gone, one can type normally. Video: https://www.dropbox.com/s/90sp9kk73yjyajh/typing.mov?dl=0

bozhidar09:01:18

Seems to me you have some hook to reformat the code on save or something like this. CIDER doesn’t reformat anything by itself.

Suvrat Apte10:01:19

Do you have aggressive indent installed?

ognen.ivanovski13:01:20

Thanks for the hints. Yes, it seems something from my doom emacs rig is aggressively formatting. Good that I can exclude Cider. I'll check for aggressive indent; it seems like a candidate, given the github page.

Suvrat Apte13:01:20

Try disabling aggressive-indent-mode and see if the behaviour changes. If it does, it’s surely aggressive-indent.

bozhidar14:01:59

Generally I don’t recommend using aggressive-indent-mode, as it tends to affect performance a lot in bigger source files.

Suvrat Apte15:01:52

I completely agree with you. It makes Emacs very slow with big files. I add aggressive-indent-defun to before-save-hook. Do you know any better approach?

ognen.ivanovski21:01:09

Finally tracked the issue down. It wasn't agressive-indent-mode but this little "helper" https://github.com/abo-abo/lispy/blob/af1054843d1e258408d1bbe4cc936886aadec634/le-clojure.el#L487

ognen.ivanovski21:01:30

I suspect it errors out wihtin those save-excursion and leaves the buffer in a "cleaned up state".