Bug 542573 - "Rename" functionality is always disabled (Rust/Corrosion client)
Summary: "Rename" functionality is always disabled (Rust/Corrosion client)
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: LSP4E (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Mickael Istria CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-09 15:41 EST by Nicola Orru CLA
Modified: 2022-02-04 09:12 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicola Orru CLA 2018-12-09 15:41:24 EST
In Corrosion Rust/RLS client the "rename" functionality is not enabled in the IDE.

Quoting @mickaelistria: "It's a bug in LSP4E LSRenameHandler which doesn't use a good comparison to check capabilities. Please report a bug to LSP4E; there is "still a little timeframe to fix it for 2018-12.

Original report at:
https://github.com/eclipse/corrosion/issues/185#issuecomment-445543002

Here's the affected bit of the log:

```
nico@devuan-3xS:~/Projects/itadinanta/ofx-rs$ grep -i rename ~/Workspaces/workspace_rust/languageServers-log/org.eclipse.corrosion.rls.log 
LSP4E to org.eclipse.corrosion.rls:{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"processId":4421,"rootPath":"/home/nico/Projects/itadinanta/ofx-rs/","rootUri":"file:///home/nico/Projects/itadinanta/ofx-rs/","initializationOptions":{"settings":{"rust":{"goto_def_racer_fallback":true,"clippy_preference":"on"}}},"capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","delete","rename"],"failureHandling":"undo"},"symbol":{},"executeCommand":{"dynamicRegistration":true},"workspaceFolders":true},"textDocument":{"synchronization":{"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"completionItem":{"snippetSupport":true}},"hover":{},"signatureHelp":{},"references":{},"documentHighlight":{},"documentSymbol":{"symbolKind":{"valueSet":[18,17,5,14,9,10,22,24,8,1,12,11,20,6,2,3,21,16,19,25,4,7,15,23,26,13]},"hierarchicalDocumentSymbolSupport":true,"dynamicRegistration":true},"formatting":{},"rangeFormatting":{},"definition":{},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":true},"codeLens":{},"documentLink":{},"colorProvider":{},"rename":{}}},"clientName":"Eclipse IDE","trace":"off"}}
org.eclipse.corrosion.rls to LSP4E:{"jsonrpc":"2.0","id":1,"result":{"capabilities":{"textDocumentSync":2,"hoverProvider":true,"completionProvider":{"resolveProvider":true,"triggerCharacters":[".",":"]},"definitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"workspaceSymbolProvider":true,"codeActionProvider":true,"codeLensProvider":{"resolveProvider":false},"documentFormattingProvider":true,"documentRangeFormattingProvider":false,"renameProvider":true,"executeCommandProvider":{"commands":["rls.applySuggestion-4513","rls.deglobImports-4513"]}}}}
```

```
nico@devuan-3xS:~/Projects/itadinanta/ofx-rs$ grep -i refactor ~/Workspaces/workspace_rust/languageServers-log/org.eclipse.corrosion.rls.log 
LSP4E to org.eclipse.corrosion.rls:{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"processId":4421,"rootPath":"/home/nico/Projects/itadinanta/ofx-rs/","rootUri":"file:///home/nico/Projects/itadinanta/ofx-rs/","initializationOptions":{"settings":{"rust":{"goto_def_racer_fallback":true,"clippy_preference":"on"}}},"capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","delete","rename"],"failureHandling":"undo"},"symbol":{},"executeCommand":{"dynamicRegistration":true},"workspaceFolders":true},"textDocument":{"synchronization":{"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"completionItem":{"snippetSupport":true}},"hover":{},"signatureHelp":{},"references":{},"documentHighlight":{},"documentSymbol":{"symbolKind":{"valueSet":[18,17,5,14,9,10,22,24,8,1,12,11,20,6,2,3,21,16,19,25,4,7,15,23,26,13]},"hierarchicalDocumentSymbolSupport":true,"dynamicRegistration":true},"formatting":{},"rangeFormatting":{},"definition":{},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":true},"codeLens":{},"documentLink":{},"colorProvider":{},"rename":{}}},"clientName":"Eclipse IDE","trace":"off"}}
```
Comment 1 Nicola Orru CLA 2018-12-09 15:43:16 EST
Version of LSP4E is 0.8.0.201812061325 (Not listed in the Version field in the header)
Comment 2 Eclipse Genie CLA 2018-12-10 05:10:22 EST
New Gerrit change created: https://git.eclipse.org/r/133771
Comment 4 Nicola Orru CLA 2018-12-10 07:38:27 EST
Fixed in org.eclipse.lsp4e (0.8.0.201812101009)
Comment 5 Mickael Istria CLA 2018-12-10 10:40:59 EST
Thanks for the feedback Nico!