Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

item.changes.forEach is not a function during rename #110

Closed
0x7CFE opened this issue Feb 22, 2017 · 5 comments
Closed

item.changes.forEach is not a function during rename #110

0x7CFE opened this issue Feb 22, 2017 · 5 comments

Comments

@0x7CFE
Copy link

0x7CFE commented Feb 22, 2017

VSCode version info:

Version 1.9.1
Commit f9d0c687ff2ea7aabd85fb9a43129117c0ecf519
Date 2017-02-08T23:44:55.542Z
Shell 1.4.6
Renderer 53.0.2785.143
Node 6.5.0

RLS version (built from source):

commit db07d336e13e563802692887fc79b3abf9f9db37
Author: Nick Cameron <[email protected]>
Date:   Mon Feb 13 13:01:32 2017 +1300

    Delete stale save-analysis data before running rustc
    
    Fixes #121

Version of the extension: 0.3.8
OS: Linux

Description: Select variable, hit F2 to rename, enter new name, press enter.
Expected result: Variable is renamed.
Actual result: Info message «provider failed» appears.

Official plugin (rls_vscode) works as expected.

Output of the "Rust logging" channel:

DEBUG: Language Client Manager: start

FYI: This exception fires during rename:

shell.ts:437 item.changes.forEach is not a function: TypeError: item.changes.forEach is not a function
    at asWorkspaceEdit (/home/korvin/.vscode/extensions/kalitaalexey.vscode-rust-0.3.8/node_modules/vscode-languageclient/lib/protocolConverter.js:287:22)
    at process._tickCallback (internal/process/next_tick.js:103:7)e.onUnexpectedError @ shell.ts:437(anonymous function) @ shell.ts:389e.onUnexpectedExternalError @ errors.ts:74s @ errors.ts:96(anonymous function) @ rename.ts:38v @ winjs.base.raw.js:1209enter @ winjs.base.raw.js:901_run @ winjs.base.raw.js:1068_error @ winjs.base.raw.js:1041v @ winjs.base.raw.js:1209enter @ winjs.base.raw.js:901_run @ winjs.base.raw.js:1068_error @ winjs.base.raw.js:1041(anonymous function) @ async.ts:359done @ winjs.base.raw.js:1378v @ winjs.base.raw.js:1224enter @ winjs.base.raw.js:901_run @ winjs.base.raw.js:1068_error @ winjs.base.raw.js:1041e.resolveErr @ ipcRemoteCom.ts:110f @ ipcRemoteCom.ts:203_combinedTickCallback @ internal/process/next_tick.js:67_tickCallback @ internal/process/next_tick.js:98
@KalitaAlexey
Copy link
Member

I'll look at it.
Thanks.

@KalitaAlexey
Copy link
Member

The problem is caused because my extension uses newer version of "vscode-languageclient".
I have opened an issue: microsoft/vscode-languageserver-node#173

@0x7CFE
Copy link
Author

0x7CFE commented Feb 26, 2017

Could you please tell me how to update the plugin? VS Code do not show me that any plugin updates are available, hence rename still not working.

@KalitaAlexey
Copy link
Member

KalitaAlexey commented Feb 26, 2017

@0x7CFE,
I am opened a PR to bump version.
#120
When it is checked,
I will publish new version you could update it from marketplace.
You may install version from source:
https://github.com/editor-rs/vscode-rust/blob/master/doc/install_extension_from_source.md

@0x7CFE
Copy link
Author

0x7CFE commented Feb 26, 2017

Ok, got it. Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants