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
Issue Opening Folder Using vscode.openFolder #55891
Comments
cc @bpasero |
@allileong It works if you prefix the local path with @jrieken In the stable bits of 1.25.1, this would work even without the prefix of the scheme. I am not sure if the api for |
The That surfaces the bug in the user code: The error message is confusing. The error message is shown when trying to open a worbench window on an invalid URI (in this case, a URI without scheme). |
Hi @ramya-rao-a , prefixing the local path with |
@allileong Please use |
@aeschli what you're saying is that our implementation of /**
* Create an URI from a string. Will throw if the given value is not
* valid.
*
* @param value The string value of an Uri.
* @return A new Uri instance.
*/
static parse(value: string): Uri; but for local file path inputs it creates URIs without a mandatory scheme component, i.e. invalid URIs. |
I don't think he is saying that. The issue is this: |
We don't throw when uri components are missing, we only do little validation e.g. checking authority and path constraints etc |
I have experimented with enforcing that URIs must have a scheme... Un-commenting this code yields in many, many test failures and while the product starts we will likely see failure here and there. So, iff we want to support scheme-enforcement a coordinated effort is needed. |
We now throw an exception when invoking |
I change the fix to treat the missing schema gracefully. The URI without scheme is converted to a Extensions are advised to not rely on the workaround but change |
@aeschli The warning message doesn't expand |
@chrmarti Good catch, I added a fix. I also improved the fix to use URI.file(uri.toString()) as alternative URL (then it also works on windows). |
@chrmarti If you can verify again that would be great |
Thanks @aeschli for the fix |
While running a custom extension, I execute:
I get a 'Path does not exist error', even though the path exists.
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: