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

Why is WorkspaceEditCapabilities's constructor setting documentChanges is deprecated? #822

Closed
ForNeVeR opened this issue Mar 19, 2024 · 3 comments · Fixed by #831
Closed
Labels
Milestone

Comments

@ForNeVeR
Copy link

See this constructor:

@Deprecated
new(Boolean documentChanges) {
this.documentChanges = documentChanges
}

It is unclear why it was deprecated. This deprecation notice has been added in commit 43a0e07, seemingly after a review in #277 and deprecation of Boolean resourceChanges member of the same type.

Perhaps @yaohaizh just mistaken resourceChanges and documentChanges while doing that? Anyway, I think it's a good idea to add an explanation to the deprecation notice (it looks like you can just safely use setDocumentChanges instead). Optionally, we may un-deprecate the constructor in question.

@pisv
Copy link
Contributor

pisv commented Mar 20, 2024

Although it is indeed unclear why this constructor was deprecated, I'd be inclined to just remove it now. There are as many as five properties in WorkspaceEditCapabilities -- all of them are optional, and there seems to be nothing special in the documentChanges property to justify this constructor.

@jonahgraham WDYT?

@ForNeVeR
Copy link
Author

If you don't wanna to introduce a breaking change for nothing, then it would be better to maybe start by providing a description in the deprecation annotation 😅

jonahgraham added a commit to jonahgraham/lsp4j that referenced this issue May 14, 2024
jonahgraham added a commit to jonahgraham/lsp4j that referenced this issue May 14, 2024
@jonahgraham jonahgraham added this to the 0.23.0 milestone May 14, 2024
jonahgraham added a commit that referenced this issue May 14, 2024
@jonahgraham
Copy link
Contributor

I added some documentation based on this conversation. We can remove the deprecated code at some point, but I recommend we do that around the time we update to soon to be released (I assume?) LSP 3.18 spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants