Fork me on GitHub
#cider
<
2021-04-06
>
bozhidar07:04:00

I've been wondering lately what to do with suitable (the cljs completion library), as it has been broken for shadow-cljs for ages and disable in cider-nrepl because of this. See https://github.com/rksm/clj-suitable/issues/15 Ideally familiar with shadow-cljs should fix this issue, but as one year has passed and no one has stepped forward I'm not holding my breath. I can also disable this conditionally for shadow-cljs only or I can potentially remove it completely from CIDER and go back to the way things were before suitable. (e.g. I can put the generic completion code in Orchard and drop the fancy suitable stuff). As I don't use ClojureScript at all, I don't want to invest a lot of time in this, but it definitely frustrates me that things are the way they are. If someone here wants to help out with the clj-suitable issue that'd be greatly appreciated! If not - I'm leaning towards removing it from CIDER completely to simplify my life. The first option looks like less work for someone familiar with shadow, the second is what I know how to do. 馃槃

thheller07:04:08

@bozhidar would it not be possible to have to his a completely separate opt-in library? I mean have a default auto-complete middleware and if loaded the suitable lib could just place itself in front of that and intercept/handle the messages like piggieback does?

thheller07:04:24

doesn't change the problem but might ease your maintenance burden by keeping it out of your way

bozhidar07:04:26

It is possible but it seems like an overkill at this point, especially since we moved the basic completion code for ClojureScript there as well. It seems to me it'd be much better to just update suitable for the shadow changes.

thheller07:04:55

ah ok, didn't know that. thought there was a fallback solution

bozhidar07:04:38

It has two completion sources - one that uses the cljs compiler state and always works and another one that inspects the runtime state and got broken.

bozhidar07:04:06

Now that nREPL has a completion op built-in some completion should ideally come from piggieback and shadow directly, but I'm guessing it will take us a while to get there.

thheller07:04:49

are there some docs for the nrepl messages going over the network for this?

thheller07:04:14

always easier to look at the protocol than trying to reverse engineer the code

thheller07:04:14

well realistically I don't have time to dig into this anyways but I'd be happy to help out answering questions if anyone needs help regarding the shadow-cljs parts

thheller07:04:52

happy to add more official API methods if needed as well. don't go digging deep into internals like suitable did. I make no guarantees they won't break again.

bozhidar07:04:43

The basic idea was that if more essential ops were supported out of the box fewer people would need additional setup/middleware.

bozhidar07:04:57

If shadow's middleware exposed those ops then shadow users would get some extra mileage without the need for cider-nrepl to be around.

bozhidar07:04:30

(and at some point I'll likely stuff something similar in piggieback)

Bingen Galartza Iparragirre07:04:08

Hi! I'm also having https://clojurians.slack.com/archives/C0617A8PQ/p1617373864130200 very same problem (`Symbol's function definition is void: seq-contains-p` when running cider-jack-in/`cider-connect`). I deleted the .emacs.d folder and reinstalled prelude, but it didn't help. I'm using Emacs 26.1 . Any idea what else could I try ?

bozhidar08:04:32

@bingen.galartza You need to update the seq.el package to its most recent version.

Bingen Galartza Iparragirre08:04:05

In my package list I see both seq 2.20 and 2.22 (which I guess is the latest). The first one is built-in and the seconds is installed by Prelude. Should I delete the old version? I'm quite a newbie with Emacs internals

bozhidar08:04:22

Not sure that you can delete a built-in package, but I guess you can try.

Bingen Galartza Iparragirre08:04:07

Ok, thanks, I will investigate

bozhidar08:04:38

I've reverted CIDER to use the deprecated seq-contains just now. It seems it's better to have a deprecation message than to deal with all this breakage.

Bingen Galartza Iparragirre09:04:18

Working like a charm. Thanks again

bozhidar09:04:11

Not a problem. It broke CIDER's CI (lint error), so I replaced with member in the end. At least I remembered why I had changed the deprecated function in the first place. 馃槃

馃憤 1
dpsutton15:04:56

馃憤 2
cider 4
馃殌 2
Karol W贸jcik16:04:47

Emacs for life! 馃槏:the_horns::skin-tone-4:

馃挭 2
richiardiandrea23:04:27

we 馃

馃槀 1