-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Check Workspace Edit ResourceOps #15101
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
Conversation
Fixes rust-lang#14780 . This commit introduces guards for checking if the client supports ResourceOperations for operations to use them.
Regarding CI failure, the slow tests are failing because the capabilities are not set by default. You'll have to add them here https://github.com/Veykril/rust-analyzer/blob/00b9d9faf43936d0c4393870ffd14580078924d0/crates/rust-analyzer/tests/slow-tests/support.rs#L109-L144 |
@bors r+ |
☀️ Test successful - checks-actions |
I'm just thinking aloud, but I wonder if it would be better not to offer a code-action to the client that would later lead to the error of "Client does not support {} capability". What do you think, @alibektas? |
This was how I first thought I would do it as finding which code actions can be shown to the client requires unnecessary computation. There were two aspects that spoke against it ( which I discussed with more experienced contributors and they actually dissuaded me to not do it the way you also propose ) let me list them :
So all in all it is doable but less favorable |
Thanks for the explanation. It all makes sense. |
PR fixes #14780