plugin-ext: fix local-dir resolution#8385
Conversation
| async onWillStart(context: PluginDeployerStartContext): Promise<void> { | ||
| const extensionsDirUri = await this.environments.getExtensionsDirUri(); | ||
| context.userEntries.push(extensionsDirUri.withScheme('local-dir').toString()); | ||
| context.userEntries.push(extensionsDirUri.withScheme('local-dir').toString(true)); |
There was a problem hiding this comment.
Are you sure it is necessary?
There was a problem hiding this comment.
You are right, it works without. Will remove.
There was a problem hiding this comment.
Is there a reason why we prefer URI encoded strings? It made goofy-looking paths when debugging, and if someone doesn't parse it back into a URI object it will most likely cause issues. I could not find a reason why we want URI encoded strings here.
There was a problem hiding this comment.
We use encoded by default since we pass them over the wire and not encoded when we need to give to a user for navigation. Here it does not matter. What is important that one should use FileUri.parse to get a system dependent path it can handle encoded and not encoded URIs.
packages/plugin-ext/src/main/node/resolvers/plugin-local-dir-resolver.ts
Show resolved
Hide resolved
|
@eclipse-theia/ecd-theia-committers Could someone with the window machine verify? |
a7bfef9 to
52d394a
Compare
Windows: Extensions are not picked up from the user's home. Node's FS API. Use `FileUri.fsPath` to get a valid system path. Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
52d394a to
a188c1b
Compare
kittaakos
left a comment
There was a problem hiding this comment.
Verified. I installed the Go To Method extension. Quit the app, start the app, the extension was in the view among the installed ones. It did not work from the master.
Windows: Extensions are not picked up from the user's home.
Node's FS API.
Use
FileUri.fsPathto get a valid system path.Signed-off-by: Paul Maréchal paul.marechal@ericsson.com
How to test
Windows:
Review checklist
Reminder for reviewers