-
Notifications
You must be signed in to change notification settings - Fork 111
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
Conversation
cli/cmd/start/start.go
Outdated
if err != nil { | ||
return err | ||
} | ||
if !info.IsDir() { | ||
if !info.IsDir() && drivers.IsIgnored(path, ignorePaths) { |
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.
is tmp directly added to ignorePaths by default during project initialization?
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.
Yes here is the full list: https://github.com/rilldata/rill/blob/main/runtime/drivers/repo.go#L52
cli/cmd/start/start.go
Outdated
} | ||
} | ||
|
||
err = filepath.Walk(path, func(path string, info os.FileInfo, err error) error { |
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.
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.
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.
Good point, updated.
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.
LGTM
We use
ignore_paths
with a few hardcoded paths while reading the project files. But this was missing while we check for large projects duringrill start