Skip to content
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

Mark deprecated rangeLength optional in TextDocumentContentChangeEvent #123

Merged
merged 3 commits into from
Jun 18, 2020
Merged

Mark deprecated rangeLength optional in TextDocumentContentChangeEvent #123

merged 3 commits into from
Jun 18, 2020

Conversation

deathaxe
Copy link
Contributor

The rangeLength attribute in the TextDocumentContentChangeEvent is marked deprecated and therefore no longer enforced by pygls. If it is passed by a client, it is accepted silently, but as it is not needed for text synchronization at all, it is marked optional.

As the result the whole Document.apply_change() method can be slightly simplified.

Description (e.g. "Related to ...", etc.)

Please replace this description with a concise description of this Pull Request.

Code review checklist (for code reviewer to complete)

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
  • Title summarizes what is changing
  • Commit messages are meaningful (see this for details)
  • Tests have been included and/or updated, as appropriate
  • Docstrings have been included and/or updated, as appropriate
  • Standalone docs have been updated accordingly
  • CONTRIBUTORS.md was updated, as appropriate
  • Changelog has been updated, as needed (see CHANGELOG.md)

pygls/workspace.py Show resolved Hide resolved
@danixeee danixeee added the enhancement New feature or request label May 14, 2020
@danixeee
Copy link
Contributor

mypy check still fails, can you check that? Maybe you can cherry-pick types.py changes from this PR to #125 and we can merge #125 first.

deathaxe added 3 commits May 18, 2020 18:15
The rangeLength attribute in the TextDocumentContentChangeEvent is
marked deprecated and therefore no longer enforced by pygls. If it is
passed by a client, it is accepted silently, but as it is not needed for
text synchronization at all, it is marked optional.

As the result the whole Document.apply_change() method can be slightly
simplified.
According to the LSP specs `range` is not optional but may be empty.
@danixeee
Copy link
Contributor

danixeee commented Jun 2, 2020

@pappasam Could you please check/confirm that this PR does not break fixes you made in #78?

@danixeee danixeee merged commit 7bcd69d into openlawlibrary:master Jun 18, 2020
@deathaxe deathaxe deleted the pr/remove-didchange-rangelength branch March 15, 2021 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants