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

"Workspace folder was undefined" message in Tasks Output channel when new workspace uses FileSystemProvider #192490

Closed
gjsjohnmurray opened this issue Sep 7, 2023 · 4 comments · Fixed by #196247
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders tasks Task system issues verified Verification succeeded
Milestone

Comments

@gjsjohnmurray
Copy link
Contributor

Type: Bug

  1. Install https://marketplace.visualstudio.com/items?itemName=jrieken.vscode-memfs from Marketplace which is a packaged version of fsprovider-sample
  2. Open Panel, switch to Output tab and choose Tasks channel.
  3. With no folder or workspace open, run the MemFS: Setup Workspace command.
  4. Observe the "Workspace folder was undefined" message.

The message come from here:

problemReporter.fatal(nls.localize('TaskSystem.workspaceFolderError', 'Workspace folder was undefined'));

I think the task system is trying to do something (an onFolderOpen task?) for the memfs scheme before the task system for that scheme has been registered.

As a minimum change I think the message should become "Task system for ${workspaceFolder.uri.scheme} is unavailable".

Better, the message could be suppressed.

Best, the sequencing could be revised so the task system registration for the FSP's scheme happens before it is first used.

Further observation is that running Developer: Reload Window does not produce the message again.

VS Code version: Code 1.82.0 (8b617bd, 2023-09-06T22:07:07.438Z)
OS version: Windows_NT x64 10.0.22621
Modes:

@gjsjohnmurray
Copy link
Contributor Author

Note, this is not a new 1.82 problem. It also happened in 1.81.1.

@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities tasks Task system issues labels Sep 8, 2023
@gjsjohnmurray
Copy link
Contributor Author

I started looking at fixing this, but didn't find a path that calls registerTaskSystem for any schemes other than Schemas.vscodeRemote and Schemas.file.

Should it also be getting called for schemes that FileSystemProviders implement?

@gjsjohnmurray
Copy link
Contributor Author

The "Workspace folder was undefined" message was introduced by #168209

Pinging @meganrogge and @alexr00 about what should happen for a scheme contributed by a FSP.

@gjsjohnmurray
Copy link
Contributor Author

Pinging @meganrogge and @alexr00 about what should happen for a scheme contributed by a FSP.

Scratch that - I believe I have answered my own question in the PR I just submitted.

@meganrogge meganrogge added this to the November 2023 milestone Oct 23, 2023
meganrogge added a commit that referenced this issue Oct 30, 2023
Remove redundant task system message and early return affecting FSPs (fix #192490)
@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Oct 30, 2023
@roblourens roblourens added the verified Verification succeeded label Nov 29, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders tasks Task system issues verified Verification succeeded
Projects
None yet
4 participants