cider

A channel dedicated to the Clojure Interactive Development Environment that Rocks (aka CIDER). :cider:
bozhidar 2021-04-13T07:33:57.249900Z

@srijayanth I think it might be handy to just add a project-level configuration variable that can be used to specify the project root ns. People would be able to use it in case the inference doesn’t work properly for one reason or another.

craftybones 2021-04-13T07:35:56.250800Z

That could work, though I am still surprised this isn’t working. The env property user.dir is set correctly

craftybones 2021-04-13T07:36:04.251Z

so it is set to project root

bozhidar 2021-04-13T07:53:09.252200Z

Hmm, so I guess it’s something else. Might be a good idea to debug what’s happening exactly when you run the command. I’m on the road this week and my ability to debug anything is quite limited right now. You can also file a GH issue, so we won’t forget about this.

vemv 2021-04-13T08:51:54.252800Z

Sounds good if I try to fix the https://github.com/clojure-emacs/refactor-nrepl build? No overlap w/ someone else?

❤️ 1
bozhidar 2021-04-13T08:54:53.253800Z

@vemv Definitely! It’s safe to say that refactor-nrepl has been getting very little love lately, so it’s extremely unlikely to run into conflicts with anyone there. 🙂

vemv 2021-04-13T08:55:53.253900Z

:cider: ! Nice, I have some possible improvements to propose, especially cljr-slash perf improvements

👍 1
yuhan 2021-04-13T09:44:38.254300Z

That would be awesome :) cljr-slash is probably the most useful command in the library, but it causes a 1-2 second lag every time I use it on a fully qualified namespace.

vemv 2021-04-13T09:57:07.254500Z

1-2? you're lucky ;p I reduced it to 1-2 from ~8 or so, don't remember exactly the numbers. I have ~900 .clj files in my largest work project (oc it's also faster in non-humongous projects)

😱 1
vemv 2021-04-13T09:58:00.254700Z

> every time I use it on a fully qualified namespace good observation, this is part of my plan. there's a few edge cases where cljr-slash should be a no-op, which is the best possible optimization ^^

yuhan 2021-04-13T10:08:08.255Z

looking forward to it!

yuhan 2021-04-13T10:16:54.255200Z

Looks like it also triggers on fractions like 1/2, but that might be better fixed on the emacs package

➕ 2
Rusty Shackleford 2021-04-13T19:33:58.267600Z

Hi all, is there a ready-made way to cider-connect to a running nREPL that does not have the cider middleware already loaded, and then inject that middleware dynamically, i.e. without having to alter the original code that exposes the nREPL? My use-case: I'd like to hack around on clojure-lsp, which will start a "vanilla" nREPL instance if built with a debug flag. So I've built it locally with that flag, configured lsp-mode to use that build, fired up Emacs and lsp-mode, retrieved the port number the nREPL is exposing, and then would like to use Cider for debugging etc. as I mess around with the code. But when I cider-connect to the running nREPL I get WARNING: CIDER requires cider-nrepl to be fully functional. Some features will not be available without it! If I'm reading the docs correctly, I believe I can add cider-nrepl to the project's deps.edn, find the code that starts the repl and add some parameters to include the cider middleware at startup, then rebuild, but I'm wondering if there's a built-in way to do this on the fly? Reading through the nrepl docs, it looks like it does expose a wrap-dynamic-loader function that could do this, but I've having trouble putting all the pieces together for how that might be invoked directly from Cider (somewhat new to Clojure, coming from Java-land).

blak3mill3r 2021-04-13T20:52:07.267700Z

Slightly tricky, the fractions... however the fact that symbols in Clojure cannot start with a number at least makes it possible to parse without backtracking

blak3mill3r 2021-04-13T20:53:51.267900Z

I love cljr-slash and the rest of refactor-nrepl ... but I disabled it a while ago because of some combination of lag and suspicion of buggy interactions 😞