vscode-js-annotations icon indicating copy to clipboard operation
vscode-js-annotations copied to clipboard

Change in vscode breaks this extension

Open yume-chan opened this issue 5 years ago • 4 comments
trafficstars

VS Code Version: 1.45.0-insider (user setup) Commit: abb4a35cfc26102f93fd00df7b59ce1a19c2017a Date: 2020-04-28T05:36:25.810Z Electron: 7.2.2 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Windows_NT x64 10.0.18363 Extension Version: 0.11.0

What's the issue:

As mentioned in microsoft/vscode#96240, vscode command vscode.executeDefinitionProvider has been changed to return LocationLink[] instead Location[] in insider version.

Which breaks this extension.

yume-chan avatar Apr 28 '20 07:04 yume-chan

Any idea how to fix it?

cmoleka avatar May 01 '20 20:05 cmoleka

@cmoleka Currently this extension only calls that command here:

https://github.com/lannonbr/vscode-js-annotations/blob/f4d9659eeea483ff856695b21ab7883d5beba439/src/parser.ts#L241

The easiest way to fix it might be that if the command returns vscode.LocationLink[] (new version of vscode), convert them back to vscode.Location[] by renaming corresponding fields. So every thing else will continue to work.

As vscode.LocationLink was added in a newer version of vscode than this extension is targeting, we can't directly use this type. We can just use any here.

yume-chan avatar May 02 '20 13:05 yume-chan

Still broken!

This extension was useful

jonit-dev avatar May 21 '20 05:05 jonit-dev

I installed this extension last week and it doesn't work for javascript or typescript? I assume it because of the above issue...

mrwcjoughin avatar May 25 '20 14:05 mrwcjoughin