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.onDidChangeWorkspaceFolders not triggered when open Folder as a single-root workspace #137263

Closed
luyu12 opened this issue Nov 16, 2021 · 3 comments
Assignees
Labels
api insiders-released Patch has been released in VS Code Insiders polish Cleanup and polish issue
Milestone

Comments

@luyu12
Copy link

luyu12 commented Nov 16, 2021

  • VS Code Version:1.62.0
  • OS Version: MACOS 11.6

The api workspace.onDidChangeWorkspaceFolders is not firing when open folder as a single-root workspace initially.
But it works normally with adding folders to the existing workspace.
I checked out the api docs and not sure if this is the expected behavior since the description of the 'onDidChangeWorkspaceFolders' is "An event that is emitted when a workspace folder is added or removed."

@bpasero
Copy link
Member

bpasero commented Nov 16, 2021

This is due to #69335, I will push a change to document this better.

@bpasero bpasero added this to the November 2021 milestone Nov 16, 2021
@bpasero bpasero added api polish Cleanup and polish issue labels Nov 16, 2021
@luyu12
Copy link
Author

luyu12 commented Nov 16, 2021

ok, Thank you! If I understand this correct, this is the current expected behavior.
I'm working on the extension need to add the listener to the open folder event. Is there any other APIs as a workaround?

@bpasero
Copy link
Member

bpasero commented Nov 16, 2021

Yes, expected behaviour and no workaround currently.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api insiders-released Patch has been released in VS Code Insiders polish Cleanup and polish issue
Projects
None yet
Development

No branches or pull requests

3 participants
@bpasero @luyu12 and others