-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[dtd] Add a 'getProjectRoots' method on the DTD file system API #54790
Comments
Why is this a 'area-vm' issue, can this be handled purely in DTD code ? |
chatted with @bkonyi and updated the labels. |
Out of interest, do we really want the project roots here, or will the workspace roots do? If the goal is to restrict where the clients can read from, I think the workspace (eg. the folders the user opened in their IDE) might make more sense. However these are not necessarily project roots (because they may have opened a monorepo). Currently, in Dart-Code we have to walk the tree to find projects (where there are |
What is the difference between "project roots" and "workspace roots"? I have been using those terms interchangeably. Is a "project root" considered to be a directory that contains a If so, then I'm referring to workspace roots in this issue. |
CC @CoderDake @bkonyi @helin24 - maybe we should come to agreement on terminology here. Should we change |
Yeah, that's how I'd describe them. VS Code and LSP call the top-level folders you open (which can be one - a single-root workspace, or multiple - a multi-root workspace) "WorkspaceFolders". I use "project" to mean something with a pubspec (maybe "package" would be better for Dart, but in other languages they'd be Projects). We also often refer to "analysis roots" in the analyzer, but for VS Code/LSP these are just the same as "Workspace Folders"/"Workspace roots" (with some uninteresting exceptions). |
SGTM :) |
This came up earlier and @jacob314 informed me that setPubRootDirectories doesn't actually need the individual project folders, and it would be better to send the IDE workspace roots. He also pointed out that Pub has a concept of "Workspaces" and the term is a little overloaded. So, it might be better to label these roots discussed above consistently as "IDE Workspace Roots" to avoid any confusion with "Pub Workspace Roots" that might exist in future. Although those might end up being the same on most cases, it's not guaranteed so it may bet best to avoid the ambiguous "Workspace Roots" without a qualifier. |
And this should work fine for IntelliJ also. |
This should return the value set by the 'setProjectRoots' method (which requires a secret). The 'getProjectRoots' should not require a secret.
@CoderDake @bkonyi
The text was updated successfully, but these errors were encountered: