microsoft / microsoft/language-server-protocol

textDocument/didChange version number reaches maximum value

Open
#2,053 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

clarification
Dominant language
TypeScript
Stars
13k
Forks
1k
Avg merge
6d 1h
Merged PRs (30d)
10

Description

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#versionedTextDocumentIdentifier

  • The version number of a document will increase after each change,
  • including undo/redo. The number doesn't need to be consecutive.

What happens when the version number reaches the number.max value, and there are still changes?
At that point, server won't see new changes as version can't increase anymore. (It may sound like an edge case, but shouldn't specification address edge cases?).

After reaching the max value, I propose resetting the version counter to 0.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start with the linked LSP 3.17 specification section for VersionedTextDocumentIdentifier and review the stated version-number requirement. Determine how the specification should define behavior at the maximum value, with the proposed reset to 0 as the issue's suggested direction; done means the edge case and resulting client/server behavior are explicitly specified.

Written by the indexing model from the issue text.

Assessment

Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.