Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stale (merlin) diagnostics reported by olsp (> 1.13.1) when used with vscode #941

Closed
Kakadu opened this issue Nov 30, 2022 · 9 comments
Closed
Milestone

Comments

@Kakadu
Copy link

Kakadu commented Nov 30, 2022

While using ocaml-lsp 1.14.x with VsCode ocaml-platform, I'm getting very often to the situation when VsCode highlights previous errors, which are already fixed. Usually, restarting the server helps, but not for very long. The ocaml-lsp 1.13.x doesn't have this issue, so I'm currently using the previous version.

Sorry, I'm not sure how to get meaningful log.

Did anybody else reported something similar?

@ulugbekna
Copy link
Collaborator

Could you show how such an error looks like?

Dune-reported errors shown in the editor by olsp may get stalled until you save the document. Could it be your case? Just saving the document should update the reported diagnostics

@Kakadu
Copy link
Author

Kakadu commented Nov 30, 2022

Screenshot_20221201_003514

@ulugbekna ulugbekna changed the title Leftover formatting in VsCode + ocaml-lsp > 1.13.1 [user story][regression] Stale (merlin) diagnostics reported by olsp (> 1.13.1) when used with vscode Dec 5, 2022
@ulugbekna
Copy link
Collaborator

Looking at 1.14.0 changes, I suspect #853 to be at fault. Nevertheless, I don't experience the problem myself. It would be very helpful if you could git bisect the problem @Kakadu. You should be able to just check out the repo, run git bisect as usual, and use make install to install the current HEAD. You may need to git submodule update to update the vendored merlin code, as far as I understand.

@Kakadu
Copy link
Author

Kakadu commented Dec 5, 2022

I will try to bisect

@rgrinberg
Copy link
Member

@Kakadu any updates on this?

@Kakadu
Copy link
Author

Kakadu commented Dec 27, 2022

No luck yet. I started to think, that this is so Heizenbuggy, that it appears before 1.13.x, but much much rarely

@Kakadu
Copy link
Author

Kakadu commented Jan 3, 2023

I didn't manage to bisect this yet, but got a video of reproduction. Maybe it will be better than nothing

https://www.youtube.com/watch?v=WyA4etBH98k
https://gist.github.com/Kakadu/ae73708222b70b6074c7555be646b849

@Kakadu
Copy link
Author

Kakadu commented Jan 8, 2023

TT, that after a few days I can't reproduce it again.

@rgrinberg rgrinberg added this to the 1.15.1 milestone Jan 12, 2023
@rgrinberg
Copy link
Member

Same as #1003. Should be fixed in the next point release.

@rgrinberg rgrinberg closed this as not planned Won't fix, can't repro, duplicate, stale Jan 12, 2023
ulugbekna added a commit to ulugbekna/opam-repository that referenced this issue Jan 19, 2023
CHANGES:

## Fixes

- Fix race condition when a document was being edited and dune in watch mode was
  running ([ocaml/ocaml-lsp#1005](ocaml/ocaml-lsp#1005), fixes
  [ocaml/ocaml-lsp#941](ocaml/ocaml-lsp#941),
  [ocaml/ocaml-lsp#1003](ocaml/ocaml-lsp#1003))
ulugbekna added a commit to ulugbekna/opam-repository that referenced this issue Jan 19, 2023
CHANGES:

## Fixes

- Fix race condition when a document was being edited and dune in watch mode was
  running ([ocaml/ocaml-lsp#1005](ocaml/ocaml-lsp#1005), fixes
  [ocaml/ocaml-lsp#941](ocaml/ocaml-lsp#941),
  [ocaml/ocaml-lsp#1003](ocaml/ocaml-lsp#1003))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants