Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#3,639 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
ruby
Domain
devtools

Research direction

Start by tracing the textDocument/didOpen handler and the indexing process, then reproduce the three timing scenarios described in the issue. Done means indexing the same unchanged URI through those paths never creates duplicate entries; add or run focused tests for each scenario if the existing test structure supports them.

Written by the indexing model from the issue text.

Description

bug pinned

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
Dominant language
Ruby
Stars
2k
Forks
281
Avg merge
1h 47m
Merged PRs (30d)
8

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Shopify/ruby-lsp

All issues in Shopify/ruby-lsp

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.