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

Rename InitializeBuildParams to BuildInitializeParams (same for ShutdownBuildParams) #562

Open
agluszak opened this issue Jun 30, 2023 · 3 comments

Comments

@agluszak
Copy link
Collaborator

Params of methods "build/initialize" and "build/shutdown" are named "InitializeBuildParams" and "ShutdownBuildParams", so to keep things consistent we should rename the params. All other params are named "${methodName}Params}".

BTW, I think we should remove the "build" part of it altogether, because these methods are not related in any way to building. They are related to the lifetime of the server.

@jastice
Copy link
Member

jastice commented Jun 30, 2023

Params of methods "build/initialize" and "build/shutdown" are named "InitializeBuildParams" and "ShutdownBuildParams", so to keep things consistent we should rename the params. All other params are named "${methodName}Params}".

Agree, let's keep naming consistent.

BTW, I think we should remove the "build" part of it altogether, because these methods are not related in any way to building. They are related to the lifetime of the server.

Not sure I agree. Naming is based on json-rpc method names. To change it we'd have to change the protocol. I think the rationale for this name is that build refers to the scope of the build server, not a build action. However, we could consider renaming them in a future protocol version - maybe server/initialize or just workspace/initialize? Depending on how they would be intended.

@agluszak
Copy link
Collaborator Author

To change it we'd have to change the protocol. I think the rationale for this name is that build refers to the scope of the build server, not a build action. However, we could consider renaming them in a future protocol version - maybe server/initialize or just workspace/initialize?

Agreed

@616b2f
Copy link

616b2f commented Jan 7, 2024

To change it we'd have to change the protocol. I think the rationale for this name is that build refers to the scope of the build server, not a build action. However, we could consider renaming them in a future protocol version - maybe server/initialize or just workspace/initialize?

With the introduction of Base Protocol, this still would make sense to do (but maybe in the next version of the protocol). See https://microsoft.github.io/language-server-protocol/specifications/base/0.9/specification/#initialize

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

No branches or pull requests

3 participants