Skip to content
This repository has been archived by the owner on Jul 17, 2019. It is now read-only.

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

Open
ginomempin opened this issue Mar 15, 2019 · 4 comments
Open

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

ginomempin opened this issue Mar 15, 2019 · 4 comments

Comments

@ginomempin
Copy link

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
@stangier
Copy link

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.

@kejxu
Copy link
Contributor

kejxu commented May 3, 2019

Great catch! Just want to help confirm that vscode.previewHtml is removed in latest vscode, here is the related issue: microsoft/vscode#62630

@HaoQChen
Copy link

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

@Taowyoo
Copy link

Taowyoo commented Jun 17, 2019

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

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

5 participants