Fork me on GitHub
#dev-tooling
<
2023-11-04
>
oyakushev11:11:20

@bozhidar @vemv Hey folks, remember I once brought up if a single-file version of compliment could replace the completion implementation that nrepl currently has? What do you think about this? https://github.com/alexander-yakushev/compliment/tree/master/lite

oyakushev11:11:55

I managed to bring it down to 564 LOC which is ~2x larger than nrepl.util.completion (251 LOC)

bozhidar11:11:34

I'd be fine with using it instead of the current implementation. Would be nice to use it in REPLy as well I guess.

bozhidar11:11:10

Feel free to create a PR that replaces the current completion logic in nREPL.

👍 1
oyakushev11:11:59

I see that nrepl.util.completion uses two custom nrepl helpers - noisy-future (here https://github.com/nrepl/nrepl/blob/master/src/clojure/nrepl/util/completion.clj#L202) and sanitize-meta (here https://github.com/nrepl/nrepl/blob/master/src/clojure/nrepl/util/completion.clj#L226). Do you remember the intent? Should I try to recreate it too?

bozhidar20:11:17

noisy-future is just future with some logging. I guess it was added just to simplify debugging. sanitize-meta was added because some vars had metadata that was not bencode friendly, but I don't recall the details.

bozhidar20:11:28

I guess if the tests pass you'll be more or less good to go.