Fork me on GitHub
#cider
<
2023-12-31
>
joshcho01:12:55

if anyone has an established cider workflow, would love to see what a skilled clojurian’s workflow is like in emacs

joshcho01:12:19

mb a zoom or otherwise? would be tremendously helpful in developing my own workflow

practicalli-johnny05:12:44

This is the foundation of my workflow with Emacs & Cider (the key bindings may be Spacemacs specific but all the Clojure commands are cider) https://youtu.be/NDrpclY54E0

❤️ 1
practicalli-johnny05:12:56

I am using Portal more than the Cider inspector when visualising data in different ways (automatically capturing all evaluation results and logs for a complete repl history) https://practical.li/clojure/data-inspector/portal/

practicalli-johnny05:12:16

I'll extend that foundation workflow with some reloading tools / component state libraries, especially for server-side (backend) work, e.g building api's and similar services. Although that workflow is not specific to Emacs and I also use it with Neovim & Conjure (or any Clojure nrepl supported editor) https://practical.li/clojure/clojure-cli/repl-reloaded/

❤️ 1
joshcho07:12:47

thank you @U05254DQM !

👍 1
Ben Sless15:12:33

I'm happy to give a demo if you'd like, feel free to DM

❤️ 1
joshcho23:12:25

@U07FCNURX been a fan for many, many years ❤️

❤️ 1
wikipunk17:12:07

I upgraded CIDER to 1.12, now cider-error is not popping up from the connected CIDER REPL and I can't seem to get any exception to open a cider error buffer. Also, if there is a compile time error in code being loaded emacs freezes for a long time until I interrupt it (and seems to use a lot of CPU java side as well). I remember something like this happened in 1.11 but was fixed, or am I misremembering? In any event, has anyone else experienced their CIDER workflow not working as it did before after the upgrade to 1.12? Is there a way to revert back to 1.11.1 w/use-package quelpa incantations?

vemv19:12:42

What cider-nrepl are you using? Are you using cider-connect or cider-jack-in?

wikipunk19:12:54

cider-jack-in

[nREPL] Starting server via /usr/local/bin/clojure -A:dev -Sdeps \{\:deps\ \{nrepl/nrepl\ \{\:mvn/version\ \"1.0.0\"\}\ cider/cider-nrepl\ \{\:mvn/version\ \"0.44.0\"\}\}\ \:aliases\ \{\:cider/nrepl\ \{\:main-opts\ \[\"-m\"\ \"nrepl.cmdline\"\ \"--middleware\"\ \"\[cider.nrepl/cider-middleware\]\"\]\}\}\} -M:cider/nrepl

vemv19:12:15

Thanks! You aren't using clojure-storm, correct?

vemv19:12:16

I'm not expecting slowness in that case, if you'd like to contribute fixing it, you can create a standalone cider-nrepl server, and hit Ctrl \ there, which will create a thread dump that you can share over a github issue

vemv19:12:29

As for the compilation-error aspect, it changed, please see https://docs.cider.mx/cider/usage/dealing_with_errors.html > Starting from CIDER 1.8.0, only runtime exceptions (and not compilation errors) will cause a stacktrace buffer to be shown [...] This can be customized away but I don't believe it will fix any slowness - we'd better appreciate a thread dump

vemv19:12:55

(that is, when the slowness happens)

wikipunk19:12:50

it always happens on every error, i think the middleware is doing a lot of extra work parsing the stacktrace and it never communicates back to emacs? I am not sure. I expect that when errors happen I can quickly get an exception buffer to navigate stack trace. BTW I set the new variable "cider-clojure-compilation-error-phases" to nil and the same problem. So what do you mean by create a standalone cider-nrepl server and hit Ctrl \?

vemv19:12:27

> it always happens on every error, i think the middleware is doing a lot of extra work parsing the stacktrace and it never communicates back to emacs? Yes but it could be anything, the thread dump would help it also would be very helpful to determine whether this is project specific (sometimes specific dependencies can create unforeseen scenarios) > So what do you mean by create a standalone cider-nrepl server and hit Ctrl \? https://docs.cider.mx/cider/basics/up_and_running.html#connect-to-a-running-nrepl-server Create a repl that has cider-nrepl in it, and cider-connect to it Beforehand, set Elisp nrepl-log-messages to t, this will enable a nrepl-log buffer So an accurate report would ideally include: • the thread dump (https://chat.openai.com/share/b5269b9a-4f3c-430f-a843-84698d216c28) • the nrepl-log • whether this happens in a minimal project Thanks a lot, and happy new year!

wikipunk19:12:00

I've been using this for over a decade and never had this happen all of a sudden

vemv19:12:33

I appreciate that, but CIDER is a living project, we move things forward from time to time

wikipunk19:12:02

No one else has experienced this?

vemv19:12:36

Not with your exact combination of factors (cider-nrepl latest which fixed many things, enrich-classpath disabled, no clojure-storm which also interfered in a past version)

wikipunk19:12:40

Oh you mean take a thread dump outside of emacs

vemv19:12:56

Yes, to the JVM process, from iterm or such

wikipunk19:12:18

Ah okay, like basically, run the command as if it were jacking in and then do it

vemv19:12:38

Spawn cider-nrepl from iterm, cider-connect, (hopefully) reproduce the slowness in emacs, hit Ctrl \ in iterm right then. It will print a dump over iterm. Thanks!

wikipunk19:12:54

aha thats what you mean

vemv22:12:29

Created https://github.com/clojure-emacs/orchard/issues/222 out of our DMs - I'm hoping that would be a root cause fix

❤️ 1
wikipunk22:12:15

Thanks! (This excessive slowness I experienced may have been indirectly caused by modding Baldurs Gate 3... Which if anyone has heard of, is gigantic. Especially when you have decompiled all of the scripts and metadata for every asset.)