-
-
Notifications
You must be signed in to change notification settings - Fork 664
fix(core): scanner ignores files inside VCS #6839
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
Conversation
🦋 Changeset detectedLatest commit: 26c9791 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
If I understand correctly, your fixes are based on correctly storing the root settings, but the logic for checking ignore files didn't actually change? It seems then that is_root_ignored()
can indeed be safely removed, because I don't see it being used right now.
Regarding the test, I think it would be good to add a case watcher.tests.rs
. There's already a few tests there that you can draw inspiration from, and you can use it to create one that shows that a watcher notification doesn't result in an ignored file getting opened. And then it would probably be good to add a second one to show that a non-ignored file does get opened, because such a test seems to be missing still, but we would need one for contrast.
8a74742
to
3801596
Compare
PR description updated. Code updated and changesets added. |
c6f3a3f
to
d6127ee
Compare
Co-authored-by: Arend van Beelen jr. <arend@arendjr.nl>
Co-authored-by: Arend van Beelen jr. <arend@arendjr.nl>
a6874f9
to
1ebcf99
Compare
Now that the code is updated, yes, the PR also fixes the logic that checks if a file is ignored. When we have glob like That's because |
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.
Did we add tests for all issues? With so many issues solved in one PR it's become a bit hard to track which parts are related to which issue.
Nevertheless I'm very happy with these improvements, but we need to exclude the upwards matching for the scanner use case.
Co-authored-by: Arend van Beelen jr. <arend@arendjr.nl>
@arendjr please review the PR. I applied your suggestions, but they didn't reach the |
Tested locally again, and I can see now regressions or CPU/RAM peaks |
@ematipico I see, the watcher is now calling |
ffb3c9f
to
bc87585
Compare
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.
🥳
Summary
Closes #6838
Closes #6797
Closes #6784
This PR fixes a bug where the scanner didn't ignore files that are declared inside the root ignore files.
While it doesn't cover all cases, with this fix we give to the root ignore file the same capabilities and semantics as
files. includes
.This PR also fixes a bug where the language server didn't correctly ignore certain files when using the VCS integration, and inside the root ignore file there were globs like
dist/
.Test Plan
I did some manual testing. I also added a couple of tests.
Docs
biomejs/website#2679