Skip to content

Don't annotate SymbolInformation as Deprecated#698

Merged
jonahgraham merged 1 commit into
eclipse-lsp4j:mainfrom
jonahgraham:remove_deprecated_on_symbol_information
Feb 17, 2023
Merged

Don't annotate SymbolInformation as Deprecated#698
jonahgraham merged 1 commit into
eclipse-lsp4j:mainfrom
jonahgraham:remove_deprecated_on_symbol_information

Conversation

@jonahgraham

Copy link
Copy Markdown
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
Copy Markdown
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