vscode-ros icon indicating copy to clipboard operation
vscode-ros copied to clipboard

Warning about "vscode.previewHtml' command which is deprecated"

Open ginomempin opened this issue 7 years ago • 4 comments

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

ginomempin avatar Mar 15 '19 07:03 ginomempin

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.

stangier avatar Apr 12 '19 12:04 stangier

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

kejxu avatar May 03 '19 18:05 kejxu

It seem that the author does not update anymore, so what can we do about it?

HaoQChen avatar May 20 '19 01:05 HaoQChen

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

Taowyoo avatar Jun 17 '19 02:06 Taowyoo