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
Revisit getWorkspace-API #34843
Comments
@sandy081 Is your tool ready to check on usages of this? |
+1 for changing the default behaviour and adding that option for the current behaviour. |
@jrieken Not yet. Will be ready by tomorrow. |
+1 for changing this. @aeschli and I once had a discussion how to provide this in the LSP (which we didn't at the end) and one idea was that getWorkspaceFolder returns the folder if called with one and that we have a second method getParentWorkspaceFolders which returns an array of all parent folders. The idea was that if I am interested in nesting I am very likely interested in all parents or the top most parent. That would avoid having a flag and looping. |
I went through the list of extensions using this and how they use it. I was not able to find the sources of two but all the others use
Update: made this more simple, in the spirit of #34843 (comment) and removed the "return parent workspace folder" semantics export function getWorkspaceFolder(uri: Uri): WorkspaceFolder | undefined; |
Makes sense, though the name |
Yeah, nuked the parent-stuff all together |
We have added the
getWorkspace
-api with some special behaviour in case it's called with the path of a workspace. Not every expected that it behaves like and we should (1) have a flag to make it behave different, e.g. return the workspace folder if called with one and (2) consider changing/breaking the defaultsThe text was updated successfully, but these errors were encountered: