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

fix(lsp): don't apply preload limit to workspace walk #23123

Merged
merged 3 commits into from
Mar 31, 2024

Conversation

nayeemrmn
Copy link
Collaborator

@nayeemrmn nayeemrmn commented Mar 29, 2024

Fixes #23121.
Fixes #23141.

@nayeemrmn nayeemrmn requested a review from dsherret March 29, 2024 04:51
@@ -1069,8 +1069,7 @@ impl Inner {

fn walk_workspace(config: &Config) -> (BTreeSet<ModuleSpecifier>, bool) {
let mut workspace_files = Default::default();
let document_preload_limit =
config.workspace_settings().document_preload_limit;
let entry_limit = 1000;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't fully understand this, so I'll have to look at it in the morning, but I'm a bit concerned that a user would run into the same bug again once they have a lot of files.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They'd need 1000 files at the top level preceding deno.json for that to happen. After the multi-deno.json detection is all set up, if there's demand I want to make some of it more lazy, like scanning upwards for new scopes whenever a file is opened in the editor. Let's leave that for later though.

@nayeemrmn
Copy link
Collaborator Author

Added fix for #23141.

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nayeemrmn nayeemrmn merged commit 0144594 into denoland:main Mar 31, 2024
17 checks passed
@nayeemrmn nayeemrmn deleted the lsp-fixed-walk-limit branch March 31, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants