Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING CHANGE but not in the update doc. #102102

Closed
pikadun opened this issue Jul 10, 2020 · 1 comment
Closed

BREAKING CHANGE but not in the update doc. #102102

pikadun opened this issue Jul 10, 2020 · 1 comment
Assignees
Labels
api *as-designed Described behavior is as designed webview Webview issues

Comments

@pikadun
Copy link

pikadun commented Jul 10, 2020

  • VSCode Version: v1.47
  • OS Version: windows 10 & wls2

#97962
#102044

@mjbvz I think this is a break update but not in the update doc.

I used webview.asWebviewUri(Uri.file(<some path>)) and got a url like

Old (v1.46): "vscode-resource://file///root/repo/vscode-redis/out/view/js/main.js"
New (v1.47): "vscode-webview-resource://4653f308-3117-4192-97f2-ec249cd8f1a5/file///root/repo/vscode-redis/out/view/js/main.js"

The extension installed on wsl2(Ubuntu), and there is something more after vscode resource schema in v1.47.

@mjbvz
Copy link
Collaborator

mjbvz commented Jul 10, 2020

asWebviewUri returns a uri the works in webviews. We do not document format of the returned uri and extensions should not rely on the uri being a specific format. For example, the result of asWebviewUri is completely different when VS Code is run on desktop vs in a browser

If this change caused problems for your extension, please make sure you are not hardcoding vscode-resource in your code and instead always call asWebviewUri

@mjbvz mjbvz closed this as completed Jul 10, 2020
@mjbvz mjbvz added api *as-designed Described behavior is as designed webview Webview issues labels Jul 10, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api *as-designed Described behavior is as designed webview Webview issues
Projects
None yet
Development

No branches or pull requests

2 participants