-
Notifications
You must be signed in to change notification settings - Fork 313
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
Use DTD to project roots for the deep link tool #7366
Comments
I'm not familiar with the tool requirements just to make sure it's not accidentally overlooked, your workspace roots might not be the same as the project/package roots. Eg. your workspace root might be: [
"/mono_repo_1",
"/mono_repo_2/"
] but your packages might be in
|
Reopening since #7415 only partially fixed this issue, but it will have accuracy issues when the flutter project is not the project root. Moving discussion from #7415 to here: This approach will work well for Flutter projects where the project root is opened in the IDE, but it will not work well for projects where the flutter project is deeper in the tree. Here is an example from DevTools, where the DevTools flutter app is actually under devtools/packages/devtools_app, but it is not in the list here: @DanTup, @helin24 - does the IDE know where all the Flutter project roots are within a monorepo? If so could the IDE register a method on DTD that DevTools can call to get the Flutter project roots instead of the IDE workspace roots? |
Technically, it can find them (we don't track them, but we scan the workspace for them* when we need them such as during startup or if the user runs "Get Packages" with no file for context). However, I think we would be better reversing this and doing it in DTD. We've talked about this in the past (potentially having the analysis server do it), because the IDEs might implement this slightly differently, and the rules can change across SDK versions (for example the upcoming monorepo changes may change the rules for how to decide what a project root is). If we did this search in Dart somewhere we could share more code and evolve it with the SDK versions. Then in future, maybe the IDEs could ask DTD for the project roots instead of needing to do their own searches. * note: we only currently scan down a few levels by default for performance reasons, because sometimes people would open huge folders (like their home directory) and walking the whole tree at startup could be slow. |
Bug: flutter/devtools#7366 Change-Id: If0631f387306312655bdcbefe961692b00a7b4dc Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359320 Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com> Reviewed-by: Dan Chevalier <danchevalier@google.com> Reviewed-by: Polina Cherkasova <polinach@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com>
Right now, users have to manually enter a path to their project root. We can simplify this user journey by populating a list of project roots from the Dart Tooling Daemon. We can still show the text field for entering a path if DTD is not available.
Some additional context: #7253 (comment)
This would be a great feature to get in to the next beta (about 2 weeks until the code cutoff).
The text was updated successfully, but these errors were encountered: