Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

feat(codeintel): If SignatureDocumentation is present in SCIP, use it for hover text #62965

Merged
merged 4 commits into from
May 30, 2024

Conversation

keynmol
Copy link
Contributor

@keynmol keynmol commented May 29, 2024

Fixes GRAPH-610

  1. We prepend a markdown-formatted signature to the hover text if SignatureDocumentation field if present
  2. If the field is absent, we fall back to old behaviour of assuming that signature documentation is already present in the hover text

SignatureDocumentation was added to SCIP format a while back but it's not yet being utilised by our indexers. One of the first to do so will be scip-java (sourcegraph/scip-java#707) – with the plan for rollout being:

  1. Merge this PR and wait for a Sourcegraph release
  2. Merge scip-java PR and tag a release
  3. (optionally) update the default scip-java image in SG

This change allows handling both new SCIP indexes (those that emit SignatureDocumentation), and the old ones, which have signature prepended to Documentation field.

Test plan

  • New tests for the signature and documentation

Changelog

  • The backend now respects the SCIP signature_documentation field, and if available, uses that to create the initial part of the hover text. SCIP indexers should not repeat the text in signature_documentation inside the documentation field.

1. We prepend a markdown-formatted signature to the hover text if
   SignatureDocumentation field if present
2. If the field is absent, we fall back to old behaviour of assuming
   that signature documentation is already present in the hover text
@cla-bot cla-bot bot added the cla-signed label May 29, 2024
@keynmol keynmol requested a review from varungandhi-src May 29, 2024 15:16
@github-actions github-actions bot added team/graph Graph Team (previously Code Intel/Language Tools/Language Platform) team/product-platform labels May 29, 2024
@keynmol keynmol merged commit be5fc7e into main May 30, 2024
11 checks passed
@keynmol keynmol deleted the GRAPH-610/use-signature-documentation-scip-if-available branch May 30, 2024 09:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed team/graph Graph Team (previously Code Intel/Language Tools/Language Platform) team/product-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants