Skip to content

debug changes#1007

Closed
rgrinberg wants to merge 1 commit intomasterfrom
ps/rr/debug_changes
Closed

debug changes#1007
rgrinberg wants to merge 1 commit intomasterfrom
ps/rr/debug_changes

Conversation

@rgrinberg
Copy link
Member

@rgrinberg rgrinberg commented Jan 11, 2023

@copy could you try reproducing the issue with this PR?

You need to set the log file with an environment variable: OCAMLLSP_DEBUG_CHANGES=ocamllsp.log. Then, just reproduce the bug and paste the first change set that introduces the incorrect document.

@rgrinberg rgrinberg force-pushed the ps/rr/debug_changes branch 3 times, most recently from 7cca91a to 6db772f Compare January 11, 2023 22:14
<!-- ps-id: fcc53d5e-89b6-4f93-a7ff-3054691846db -->
@rgrinberg rgrinberg force-pushed the ps/rr/debug_changes branch from 6db772f to 41d3f56 Compare January 11, 2023 23:18
@ulugbekna
Copy link
Collaborator

ulugbekna commented Jan 11, 2023

I can reproduce but seemingly not if I rebase onto #1005

I have a suspicion that we may be changing the document in the store with an older version of it.

I also made a bit of changes to this PR here https://github.com/ocaml/ocaml-lsp/tree/debug_changes_ulugbek

@ulugbekna
Copy link
Collaborator

I also think that when auto-save is on, we try sending in a task_if_running diagnostics a lot more often, it could be possible that we compute diagnostics for a version of document that's older than the one in doc store?

@rgrinberg
Copy link
Member Author

I also think that when auto-save is on, we try sending in a task_if_running diagnostics a lot more often, it could be possible that we compute diagnostics for a version of document that's older than the one in doc store?

I don't think it would matter. An additional save in the end would fix the situation with the diagnostics. While @copy was telling us that doing additional saves at the end does not change anything.

@rgrinberg
Copy link
Member Author

the bug is fixed

@rgrinberg rgrinberg closed this Jan 13, 2023
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

Successfully merging this pull request may close these issues.

2 participants