This repository was archived by the owner on Sep 26, 2023. It is now read-only.
Spike adding deprecations to document symbols #141
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While the LSP and LSIF support marking definitions as deprecated, and sourcegraph appears capable of ingesting this data, this is currently not supported by the go indexer.
This PR is not intended for merge; instead, it is meant to provide a proof of concept and forum for discussion. It has several serious shortcomings:
Because the indexer uses
p.TypesInfo
instead of walking the AST, it's unable (as far as I can see) to access the AST to get the necessary information for more tightly-scoped definitions without an ~O(n) tree walk every time we need to look up a definition. I think the AST would be usable for the indexer, but it seems like a sizeable refactor.SymbolKind
in the spec; type aliases are not ignored, but the mapping is less than idealCollect new SymbolKinds microsoft/language-server-protocol#344 gathers some requested
SymbolKind
extensions (includingtypeAlias
), but also indicates that the team isn't really looking to expand that list at present.I think I know what would need to be done for that, but I'm not that well-versed in the spec and it's just a spike, so I figured I could handwave it.
Okay, this one is easier to solve.