Skip to content

Use of registerCapability with dynamicRegistration set to false #356

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

Open
frangio opened this issue Jan 3, 2023 · 4 comments
Open

Use of registerCapability with dynamicRegistration set to false #356

frangio opened this issue Jan 3, 2023 · 4 comments
Assignees
Labels
status:ready This issue is ready to be worked on type:bug Something isn't working

Comments

@frangio
Copy link

frangio commented Jan 3, 2023

(This is my last issue for today!)

I don't know what this means but I see this in the Neovim logs when using the server directly with the built-in LSP client:

The language server solidity triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless

@kanej
Copy link
Member

kanej commented Jan 4, 2023

My guess is: the language server returns a set of capabilities, these are either immediately available at boot or dynamically registerable (they will become available at some point). I suspect we don't have the metadata of one of our capabilities quite right, vscode has always given us a pass but neovim is being a stickler.

@kanej kanej added this to the Standalone language server milestone Jan 4, 2023
@kanej kanej added type:bug Something isn't working status:ready This issue is ready to be worked on labels Jan 4, 2023
@kanej kanej moved this to Todo in hardhat-vscode Jan 4, 2023
@antico5
Copy link
Collaborator

antico5 commented Jan 18, 2023

Just dug into this a bit. The registerCapability request that the server is sending is for the workspace/didChangeWorkspaceFolders capability. Before sending this, we check that the client supports it, according to the protocol. In this part it specifies that the server is allowed to register that capability if initializationParams.capabilities.workspace.workspaceFolders is true, and this is the case for neovim's client initialization. So I may be wrong but it looks like the problem is on nvim's language client, and the warning should not be shown.

@frangio
Copy link
Author

frangio commented Jan 18, 2023

Thanks for looking into this. I'm not familiar with the LSP spec so I can't really comment. This does seem harmless so feel free to close it.

@kanej
Copy link
Member

kanej commented Jan 19, 2023

Lets open an issue against the nvim language server client and see what they think, @antico5.

@kanej kanej moved this from Done to Blocked in hardhat-vscode Jan 19, 2023
@kanej kanej removed this from the Standalone language server milestone Feb 14, 2023
@kanej kanej self-assigned this Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on type:bug Something isn't working
Projects
Status: Blocked
Development

No branches or pull requests

3 participants