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: use ignore_paths while checking large projects during rill start #5164

Merged
merged 2 commits into from
Jul 1, 2024

Conversation

AdityaHegde
Copy link
Collaborator

We use ignore_paths with a few hardcoded paths while reading the project files. But this was missing while we check for large projects during rill start

if err != nil {
return err
}
if !info.IsDir() {
if !info.IsDir() && drivers.IsIgnored(path, ignorePaths) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

is tmp directly added to ignorePaths by default during project initialization?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

}
}

err = filepath.Walk(path, func(path string, info os.FileInfo, err error) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you change this to filepath.WalkDir and return filepath.SkipDir if the path is ignored? So that it doesn't spend time traversing ignored directories.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point, updated.

Copy link
Contributor

@begelundmuller begelundmuller left a comment

Choose a reason for hiding this comment

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

LGTM

@AdityaHegde AdityaHegde merged commit df35d1d into main Jul 1, 2024
4 checks passed
@AdityaHegde AdityaHegde deleted the fix/ignore-before-checking-limit branch July 1, 2024 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants