Support Java for Code Intelligence via the CI/CD Component
Problem to solve
Code Intelligence is largely based on the SCIP format for creating indexes. However, GitLab only supports LSIF for the backend. In order for users to get started they need to properly configure a GitLab CI/CD job that that generates and uploads the appropriate index. This task is error prone and complicated.
Proposal
There is a scip-java
indexer which can generate a SCIP compatible index for a java project. We should support the configuration of this via the Code Intelligence CI/CD Component. By doing this, we can enable users to create a scip
index and then convert it to be LSIF
compatible for GitLab.
This would be similar to the approach we're taking for the typescript template.
Additional details
Subsequently, we should ensure the index is compatible with GitLab's display. Additional details are in #224101 (closed).
The problem is that lsif document for Java is:
{"result":{"contents":{"kind":"markdown","value":"```java\njava.lang.String\n```\n---\nReturns project relative input path for sass files. If input path is absolute, remove base dir\r\nfrom string.\r\n\r\n@return project relative input path.\r\n"}},"id":"23","label":"hoverResult","type":"vertex"}
while we expect it to be
{"result": {"contents": [array of hovers]}}
both are valid examples of LSIF, we just cover the second ones at the moment