-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Build settings index in parallel for the native server #12299
Conversation
|
|
||
let directory = entry.into_path(); | ||
let mut builder = WalkBuilder::new(root); | ||
builder.standard_filters(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to respect the respect_gitignore
setting here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so. Let me check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added it where by default it's true
and if we find any config file it'll use the value from that instead.
What's also important to note is that this will exclude directories that are ignored |
Nice. |
I don't think that's the case if there's no config file present in the root directory. This is because the first loop extracts the settings from the root config file: ruff/crates/ruff_server/src/session/index/ruff_settings.rs Lines 105 to 128 in ecd6865
This is then used when walking through the project files to determine whether a directory should be excluded or not: ruff/crates/ruff_server/src/session/index/ruff_settings.rs Lines 141 to 205 in ecd6865
Maybe we can use the fallback settings if there is none in the root directory?
|
cb87b15
to
ba08519
Compare
This was a leftover from #12299
Summary
This PR updates the server to build the settings index in parallel using similar logic as
python_files_in_path
.This should help with #11366 but ideally we would want to build it lazily.
Test Plan
cargo insta test