Fork me on GitHub
#lsp
<
2023-02-01
>
didibus05:02:11

> lsp--check-document-changes-version: Document changes cannot be applied due to different document version Why would I be getting this when trying to do a rename refactor? I revisited all my buffers in Emacs, and tried again and it worked. A bit annoying though, since I didn't do anything to the buffers, did not save them, or touch anything in them, just had to revisit 7 of them, since I had many open in the project.

ericdallo10:02:08

This means that the server tried to apply changes in a document that is not in the same version, every time a buffer is changed the version is incremented and sent to server, this probably means some missed sync, I never saw that, so if you manage to repro LMK

Braden Shepherdson18:02:44

so my change from https://github.com/clojure-lsp/clojure-lsp/pull/1471 doesn't seem to be picking up :style/indent settings from dependencies, only my own codebase. if memory serves, though, deps showed up in the kondo :analysis. is it possible that different kondo options were used, or some other difference in how deps are analyzed vs. one's own code?

ericdallo18:02:26

yes, possible, there are different args that clojure-lsp passes for kondo when analyzing external deps and internal project code, let me get the link

Braden Shepherdson18:02:26

ah, I follow. that should be straightforward to change; I'll make it so and send a PR. it's not clear at a glance whether :shallow true is compatible with checking metadata, but I'll check it out.

Braden Shepherdson21:02:28

https://github.com/clojure-lsp/clojure-lsp/pull/1482 I'm not really sure how to write a test for this... but it's a pretty transparent change.

ericdallo22:02:26

We should keep the shallow true

Braden Shepherdson22:02:26

It seemed like that didn't work, but I think I might have been fighting with the .lsp/.cache when I tried that. Let me try it.

Braden Shepherdson22:02:19

ah yeah, it works, pushed.