Skip to content

Conversation

@christian-schilling
Copy link
Member

No description provided.

Copy link

Copilot AI left a 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 Filter struct for constructing filter chains
  • Migrates all filter construction code across the codebase to use the new API
  • Removes standalone functions from build.rs like nop(), 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.

@christian-schilling christian-schilling force-pushed the @changes/master/[email protected]/builder-api branch 2 times, most recently from 1dbce07 to 930667e Compare December 20, 2025 15:21
@christian-schilling christian-schilling marked this pull request as ready for review December 20, 2025 15:34
@christian-schilling christian-schilling force-pushed the @changes/master/[email protected]/builder-api branch 3 times, most recently from 622b943 to 0968a3b Compare December 21, 2025 13:43
@christian-schilling christian-schilling added this pull request to the merge queue Dec 21, 2025
Merged via the queue into master with commit cf40b29 Dec 21, 2025
2 checks passed
@christian-schilling christian-schilling deleted the @changes/master/[email protected]/builder-api branch December 21, 2025 16:27
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.

3 participants