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

Exclude sub-project files from file and editor watchers #4283

Merged
merged 6 commits into from
Jul 17, 2023

Conversation

mattseddon
Copy link
Member

@mattseddon mattseddon commented Jul 17, 2023

This PR fixes some sub-project-related issues with our file system and editor watchers. We were previously not correctly excluding sub-project files from their parent project's watchers.

@mattseddon mattseddon added the bug Something isn't working label Jul 17, 2023
@mattseddon mattseddon self-assigned this Jul 17, 2023
for (const file of fileList) {
if (file.startsWith(this.dvcRoot)) {
if (isPathInProject(file, this.dvcRoot, this.subProjects)) {
this.collectedFiles.push(file)
Copy link
Member Author

Choose a reason for hiding this comment

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

[B] Not having collectedFiles for this class was actually a bug.

Copy link
Member Author

Choose a reason for hiding this comment

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

discovered by writing a test for this functionality

@mattseddon mattseddon marked this pull request as ready for review July 17, 2023 09:29
@mattseddon mattseddon enabled auto-merge (squash) July 17, 2023 22:00
@codeclimate
Copy link

codeclimate bot commented Jul 17, 2023

Code Climate has analyzed commit fb4966a and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 91.0% (85% is the threshold).

This pull request will bring the total coverage in the repository to 95.1%.

View more on Code Climate.

@mattseddon mattseddon merged commit 9553739 into main Jul 17, 2023
3 checks passed
@mattseddon mattseddon deleted the handle-sub-projects branch July 17, 2023 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants