Warning about "vscode.previewHtml' command which is deprecated"
I'm getting the following warning from VSCode:
Extension 'ajshort.ros' uses the 'vscode.previewHtml' command which is deprecated and will be removed soon. Please file an issue against this extension to update to use VS Code's webview API.
It does not seem to cause problems now.. but it may in the future. I'm just following what the warning says.
Env:
- VS Code 1.32.3
- ROS extension 0.3.0
I think it has been removed now. When clicking on 'ROS Master' in the Boottom Right I just get an Error Notification that tells me that the command vscode.previewHtml has not been found.
Great catch! Just want to help confirm that vscode.previewHtml is removed in latest vscode, here is the related issue: https://github.com/Microsoft/vscode/issues/62630
It seem that the author does not update anymore, so what can we do about it?
It's the function in this file: https://github.com/ajshort/vscode-ros/blob/1a7ca4fa5391fc73af0a0433c9945af1332d2a46/src/master.ts
export function showMasterStatus()
{
return vscode.commands.executeCommand(
"vscode.previewHtml", vscode.Uri.parse("ros-master:"), undefined, "ROS Master"
);
}
The vscode.previewHtml has been completely been depricated here microsoft/vscode#62630 and instead the webview api should be used. https://code.visualstudio.com/api/extension-guides/webview