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

[Improvement]: Implement a command to list the LS API specifications #43635

Open
nipunayf opened this issue Nov 21, 2024 · 1 comment · May be fixed by #43641
Open

[Improvement]: Implement a command to list the LS API specifications #43635

nipunayf opened this issue Nov 21, 2024 · 1 comment · May be fixed by #43641
Assignees
Labels
Team/LanguageServer Language Server Implementation related issues. #Compiler Type/Improvement

Comments

@nipunayf
Copy link
Contributor

Description

As LS APIs update and new ones are introduced, the specification should be derivable from the LS. This ensures the LS client has an accurate information of the parameters and return values for each API.

Describe your problem(s)

No response

Describe your solution(s)

The specification is generated at runtime to determine which services are active and the corresponding specifications relevant to that specific distribution version.

To generate the specification, users can execute the CLI command bal lsspec to output all specifications related to the running LS APIs. The command can be implemented and discovered in two ways:

  1. Implemented in the cli module, making the command available out of the box with the distribution. This approach doesn't involve maintaining releases and is packaged with ballerina-lang build.
  2. Implemented as a Ballerina tool in a separate module. Users who want to use this command would need to pull the respective command from the central.

Related area

-> Compilation

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@nipunayf nipunayf added Type/Improvement Team/LanguageServer Language Server Implementation related issues. #Compiler labels Nov 21, 2024
@nipunayf nipunayf self-assigned this Nov 21, 2024
@hasithaa
Copy link
Contributor

Both approaches are feasible, but this is something core to the compiler, I am +1 for going ahead with the first approach. This will make it easy to maintain the code against a particular version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/LanguageServer Language Server Implementation related issues. #Compiler Type/Improvement
Projects
None yet
2 participants