-
Notifications
You must be signed in to change notification settings - Fork 122
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
ocaml-lsp reports bogus erros on large files when editor autosaving is enabled #1003
Comments
Are you sure you need watch mode to reproduce this? If lsp reports a false syntax error, the issue is likely due to document synchronization. |
Yeah, I'm pretty sure the issue only happens when watch mode is running. |
What about when you do the following:
Will you still see the syntax error? |
Yes, the syntax error is still present after |
Okay, then do you mind trying this PR? #1004 This sounds like a syncing issue. |
Unfortunately, the issue still happens with #1004 applied. |
I'll have a closer look. Thanks for testing. |
I was unable to reproduce the issue on master after a lot of trying. @ulugbekna have you ran into issues like this? |
Fixed by #1004 |
|
Yes, I meant the other PR. @copy please re-open if you can still repro the bug. |
I can confirm that this is fixed, cheers! |
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))
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))
I can reproduce the following issue on OCaml 4.14 with ocaml-lsp-server 1.13.1 and 1.14.2, and OCaml 5.0 with ocaml-lsp-server pinned to current
#500
(176d387).It's a bit tricky to reproduce, but the following seems to work relatively reliably.
Make some quick changes in large file with auto-saving enabled. I use the following vimrc:
Edit
core/src/command.ml
and repeatedly pasteopen Sys
at the top. After a few pastes, lsp reports a bogus syntax error, while the dune watch command doesn't print anything of the sort.Here is a recording: https://asciinema.org/a/gQqsK784tKJYwPxtB7wBn6I61
And the lsp logfile: lsp.log
The text was updated successfully, but these errors were encountered: