-
-
Notifications
You must be signed in to change notification settings - Fork 97
Registering workspace/didChangeWorkspaceFolders failed due to an invalid parameter (registrations) #1534
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
Comments
I should also mention @bmewburn; if you have any issues with the extension itself being published, I can remove it. Likewise, if you want the extension to use a different name/icon/etc. I will respect those wishes. I'll publish the source once the integration is more stable, and not throwing an error 🙂 All the extension does is act as an LSP client to Intelephense. |
Hi, @reykjalin - I was actually just about to write you email, but discovered this when I was searching this console error message. :) I was also exploring an Intelephense extension for Nova and found this same blocking point, after several other blockers that changed depending on the version of Nova - this makes me suspect the issues are on Nova's end, despite the editor working with (some?) other language servers. My off-the-cuff guess is that Nova is sending things that are technically out of LSP's spec, but some other servers are letting it slide. In any case, it's very likely up to @panicinc to address this; you might want to send the bug to them. I've sent an earlier version of it to them, got a bit of feedback on it, then nothing more. ¯\_(ツ)_/¯ Personally, I think it's probably best not to have an "Intelephense extension" available in Nova's extension directory that's nonfunctional; users are just going to download it and be disgruntled. The hope I had was to be able to publish one with a bundled Intelephense (if @bmewburn was okay with that once it started working, of course), and to have the ability to enter the "premium version" license code in the preferences (assuming Nova's API is, or becomes, good enough to both use the premium features and pass the license code to Intelephense!). You could do that, of course, at least once it's all working! |
That might very well be, but that doesn't seem to be what's causing the error. The error I'm seeing is thrown for something that is defined by the spec. That's not to say that there isn't anything wrong in Nova's implementation of the protocol, but at the least that doesn't seem to be the issue here. In addition to that, the exception is thrown in the Intelephense code, not Nova's JS engine. I can't even catch or manage the exception in any way from Nova, so I do think @bmewburn's input is required here, and possibly some changes to how Intelephense handles the registration of the
I would agree with this, but the extension is functional; I've been using it for several days now. The issue is that it makes the Extension runtime in Nova a bit unstable, and gives you that error message every time you start the extension (usually only when you start the editor or open a new project).
FWIW the preferences for extension should easily be able to handle that 🙂 What I'm mostly interested in adding is changing the stubs included when running Intelephense, which is what I plan to work on next, assuming I don't hear anything about this error. @chipotle If you still have any of the feedback from @panicinc that you think might be useful here I'd be happy to take a look at it to see if that's something that can help address the issue, but like I said before; I really do think we need @bmewburn's input here. |
@reykjalin , thanks for reporting this. I'll take a closer look when I can. The error is strange as intelephense does not dynamically register for LSP says:
Maybe it is something in the node-language-server dependency.
This is fine with me as long as credit is given in the description/readme. |
Hmm, then maybe the initialize method is doing something wrong in the Nova LSP client implementation. I'll try reaching out to Panic and see if they might now what's going on, or if they can help me debug this further.
That would certainly be difficult to manage 😅. Since Intelephense isn't managing this manually, let's assume for now that the problem is in either Nova's client or the node-language-server dependency. I'll try to dig at this some more 🤔
I'll make sure to add a statement in the extension's page giving you credit for Intelephense |
Similar issue reported here microsoft/vscode-languageserver-node#713 |
We added a dummy callback to work around this neovim/nvim-lspconfig#471 We're running into similar issues with vscode-json-languageserver expecting dynamicRegistration/ignoring formatter initialization despite the documentation. |
@bmewburn I see microsoft/vscode-languageserver-node#713 was addressed in microsoft/vscode-languageserver-node@5bc82ac which changed some things that will (hopefully) address the issue. The release cycle for microsoft/vscode-language-server-node seems to be relatively slow so I don't think we'll see a release with the fix any time soon. Is there any chance I could somehow try a version of That way I could confirm whether that fixes the issue here instead of waiting several months to find out. My wish would — of course — be to update the intelephense dependency to use the git commit, but I understand that will probably increase the maintenance burden on you, so I think that should be avoided if possible 🙂 Thanks for your hard work on Intelephense! |
@reykjalin I think it will need to wait. There's several packages in that repo with dependencies to each other and will take some effort to build and manage. |
Ok, no problem! Thanks for taking the time to consider it |
Hi again @bmewburn! I just tried all the 1.6.x versions of Intelephense with Nova, and it seems that those versions are exhibiting a different issue; not sure if it's related. Once started, Intelephense still throws the same error I reported above, but gets stuck indexing the files in the directory indefinitely. I'm not sure why, and I'm not sure how to debug the issue. What would be the best way to get some logs so I can debug the issue further? I didn't see a documented way to do this with the initialization options or cli flags. I can open a separate issue if you think this is caused by something new, and deserves it's own issue. |
@reykjalin this might be something different. I think the debug logs I use are handled by the vscode-languageclient package so not applicable in this case. There's no debug mode within the server itself. Indexing is initialised on startup and uses the Either there is some file in the workspace that causes the extension to crash or it could be too many files in the workspace (current limit is 131072). I'm going to close this issue as in 1.7 the beta version of the next vscode-languageserver is used which should fix the original issue here. Feel free to open a new one specific to indexing. |
All right, I'll wait for 1.7 and report back here. I'll wait to see if the indexing still hangs in 1.7 before opening another issue 🙂 |
Describe the bug
When starting the language server in Nova Intelephense reports that
Registering request handler for workspace/didChangeWorkspaceFolders failed
due to an invalid parameter (registrations
), despite that parameter being defined in the spec.I'm making the assumption that this error is being thrown in the
client/registerCapability
handler.The language server runs perfectly fine after this, but due to the exception thrown a pop-up shows up every time the server is started. Not super annoying but less than ideal.
The full error log
To Reproduce
You can install the trial edition of Nova and install the Intelephense extension I just published.
Expected behavior
No exception thrown.
Platform and version
npm
.The text was updated successfully, but these errors were encountered: