-
Notifications
You must be signed in to change notification settings - Fork 69
Add filter building API #1682
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
Add filter building API #1682
Conversation
fd27f1a to
93cb0e0
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.
Pull request overview
This PR introduces a builder-style API for creating filters, replacing the previous function-based approach with method chaining. The refactoring changes calls like filter::chain(filter::nop(), other_filter) to Filter::new().chain(other_filter), and filter::empty() to Filter::new().empty().
- Adds builder methods to the
Filterstruct for constructing filter chains - Migrates all filter construction code across the codebase to use the new API
- Removes standalone functions from
build.rslikenop(),empty(),message(),file(), etc.
Reviewed changes
Copilot reviewed 9 out of 12 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
josh-core/src/filter/mod.rs |
Adds builder methods to Filter struct; removes function exports; updates internal filter construction and comparison calls |
josh-core/src/build.rs |
Removes standalone filter builder functions (now methods on Filter) |
josh-core/src/flang/parse.rs |
Updates filter parsing to use builder API; changes make_op to make_filter |
josh-core/src/lib.rs |
Updates ACL filter construction to use new API |
josh-core/src/housekeeping.rs |
Updates empty() call to Filter::new().empty() |
josh-core/src/history.rs |
Updates filter comparison to use Filter::new() |
josh-core/src/filter/tree.rs |
Updates chain calls to use method syntax |
josh-core/src/cache/cache.rs |
Updates nop filter comparison to use Filter::new() |
josh-proxy/src/bin/josh-proxy.rs |
Updates filter construction and chaining to use builder methods |
josh-graphql/src/graphql.rs |
Updates filter comparisons from filter::nop() to Filter::new() |
josh-cli/src/bin/josh.rs |
Updates filter construction to use Filter::new().empty() |
josh-cli/src/bin/josh-filter.rs |
Updates filter construction and chaining with builder API |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1dbce07 to
930667e
Compare
622b943 to
0968a3b
Compare
0968a3b to
446d8fc
Compare
No description provided.