Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

Change in vscode breaks this extension #91

Open
yume-chan opened this issue Apr 28, 2020 · 4 comments
Open

Change in vscode breaks this extension #91

yume-chan opened this issue Apr 28, 2020 · 4 comments

Comments

@yume-chan
Copy link

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.

@sambeaCA
Copy link

sambeaCA commented May 1, 2020

Any idea how to fix it?

@yume-chan
Copy link
Author

yume-chan commented May 2, 2020

@cmoleka Currently this extension only calls that command here:

const locations = await vscode.commands.executeCommand<vscode.Location[]>("vscode.executeDefinitionProvider", uri, fc.functionRange.start);

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.

@jonit-dev
Copy link

Still broken!

This extension was useful

@mrwcjoughin
Copy link

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

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

4 participants