Skip to content

Duplicate entries when receiving a textDocument/didOpen before indexing is complete #3639

@vinistock

Description

@vinistock

If the user opens the editor with files already opened, the editor might be able to get some didOpen notifications sent before indexing is complete. In this case, opening the documents will also index them, but we have no way to tell the indexing process to drop the URI.

We need to ensure that that indexing the same file twice without any modifications never results in duplicates because there are some scenarios that risk it:

  • open a document before indexing is finished
  • a file is modified on disk before indexing is finished
  • a file is modified on disk and then immediately opened

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpinnedThis issue or pull request is pinned and won't be marked as stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions