-
Notifications
You must be signed in to change notification settings - Fork 28.9k
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
Folder added to workspace displays '!' warning in Explorer if folder is hosted by a FileSystemProvider implemented in an extension that is not yet activated #122004
Comments
@gjsjohnmurray I see you are already deep down investigating this. If you have a good proposal for a PR how to fix this I would be open to review. |
@isidorn is it true that the extension host won't be running at the time that this gets called? vscode/src/vs/workbench/services/configuration/browser/configurationService.ts Lines 382 to 403 in 66f0c29
The comments suggest that's true, in which case the line 400 call to checkAndMarkWorkspaceComplete goes via toValidWorkspaceFolders into FileService. Then resolve -> doResolveFile -> withProvider -> activateProvider which I think would normally be where the onFileSystem extension activation event would get the FSP extension activated. But if there's no EH then I assume this fails, so withProvider throws. |
@sandy081 might be better to answer this. |
@sandy081 I began trying to enhance this in WorkspaceService: vscode/src/vs/workbench/services/configuration/browser/configurationService.ts Lines 823 to 839 in 8fa0540
My idea was to gather the failures during the first (currently, the only) pass, then add a second pass which begins by awaiting |
@gjsjohnmurray I do not think above validation is causing the warning in the explorer. Above validation is only to check if the entry is a directory or not. The warning in explorer is shown when it cannot resolve the workspace folder. I think following events are happening in this case
I think explorer is not recovering from extension host restart and hence warning is shown even after ext host is restarted. @isidorn Please check and confirm. |
@sandy081 it's not the |
Yeah that is intended and I think this is nothing to do with the warning in the explorer. |
@sandy081 ok, so it seems like the explorer needs a fresh start on et host restart... Thanks for investigating |
This should behave a bit better now with our aggressive explorer refresh when window gains focus again or explorer gets visible. |
Issue Type: Bug
\ ● Unable to resolve workspace folder
I think the problem occurs because even though the MemFS extension specifies "onFileSystem:memfs" as one of its activation events, when VS Code adds the new folder to the currently-open (though empty) workspace it apparently doesn't activate the extension in time before going looking for a .vscode folder within the new memfs root.
By running
Developer: Show Running Extensions
before doing this we can see that MemFS does get launched. I guess this just doesn't happen soon enough.By contrast, if the memfs root is defined in the workspace at the point where the .code-workspace file is loaded the extension activates early enough and no warning indicator appears. This can be observed by running the
Developer: Reload Window
command. The memfs:/ root now displays normally.VS Code version: Code - Insiders 1.56.0-insider (0310f02, 2021-04-23T05:13:46.805Z)
OS version: Windows_NT x64 10.0.19042
The text was updated successfully, but these errors were encountered: