-
Notifications
You must be signed in to change notification settings - Fork 324
Increase project search depth, allow it to be cancelled, cache/reuse results #3974
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
Comments
This is what the current behaviour should be. Is it not what you see? Although the notification is bad and doesn't include the project name (I'll fix that), if I run Dart: Capture Logs and then accept the prompt to fetch, the logs include this:
Is this different to what you're seeing? (note: it runs them sequentially, so it may take a while to get through all of flutter/samples, but it will only run for those that need it running). |
Oh, after letting things finish I still had some that hadn't been done. The reason for this is that we only search to a certain depth for projects, and these were more deeply nested. The depth can be configured with this setting: "dart.projectSearchDepth": 5 // default is 3 Setting it to 5 and then restarted VS Code and accepting the prompt caused it to fetch all. Improving the default value has performance implications when opening large workspaces. There are some planned improvements at #3856 but it'll only help for projects where you've opened a file. I don't know of any signals we could use to figure out there may be more projects without having to walk the filesystem though. |
Ah I see. I would collect all projects with I wouldn't have an issue if it did all the fetching if there was a single notification that used something like VSCode's |
We'd need to use something that works across all OSes. VS Code does have a
I like this idea. If we showed a progress bar if the search took more than x ms with the ability to cancel, that might make it more reasonable to increase the default. We do search for projects more frequently than just at startup, so we might need to decide whether to increase it everywhere (and potentially trigger this), or cache deeper projects found at startup and use them in addition to things we find in a shallow search. I'll have a play around and see how it feels. Thanks! |
I've made some changes:
|
Thanks, it worked as expected! |
Great! Out of interest, did you see "Searching for projects" or was it fast enough to not show up? If you use Dart: Open Extension Log it should log the timings for the project search that might be interesting for me to keep an eye on. |
Yeah, it didn't show up
|
Cool, thanks! |
Is your feature request related to a problem? Please describe.
Use case: I clone a repo containing plenty of puspecs, some nested. Tons of analysis errors are surfaced. e.g. flutter/samples
Describe the solution you'd like
Clicking the button in the "Some packages are outdated. Run Flutter pub get" notification does pub get recursively, rather than at the top level and for example directories.
Describe alternatives you've considered
The alternative are various, but it'd be nice if the extension did it without me thinking.
The text was updated successfully, but these errors were encountered: