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

Don't annotate SymbolInformation as Deprecated #698

Conversation

jonahgraham
Copy link
Contributor

While SymbolInformation class is deprecated in the LSP specification. It is not annotated with Deprecated annotation because the TextDocumentService.documentSymbol method requires it and causes deprecated warning in the code of all users of that API.

Instead we mark all the methods/constructors as
@deprecated so that consumers that are actually using instances of SymbolInformation get deprecated warnings, while avoiding deprecated warnings for just referring to the type.

Fixes #697

While SymbolInformation class is deprecated in the
LSP specification. It is not annotated with Deprecated
annotation because the TextDocumentService.documentSymbol
method requires it and causes deprecated warning in
the code of all users of that API.

Instead we mark all the methods/constructors as
@deprecated so that consumers that are actually using
instances of SymbolInformation get deprecated warnings,
while avoiding deprecated warnings for just referring
to the type.

Fixes eclipse-lsp4j#697
@nixel2007
Copy link
Contributor

Sounds reasonable for me.

@jonahgraham jonahgraham merged commit 044e46c into eclipse-lsp4j:main Feb 17, 2023
@jonahgraham jonahgraham deleted the remove_deprecated_on_symbol_information branch February 17, 2023 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecated SymbolInformation and impact on documentSymbol
3 participants