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 a growable bloom filter implementation. #8

Merged
merged 4 commits into from
Feb 6, 2025

Conversation

peterhuene
Copy link
Collaborator

@peterhuene peterhuene commented Feb 6, 2025

This PR replaces the fast bloom filter implementation with a growable one.

A growable implementation is required as the bloom filter is used within a
generator; the number of elements in the bloom filter is unbounded and
dependent upon how many docker tasks are spawned rather than how many docker
tasks may spawn concurrently.

Included with these changes:

  • Use thiserror for custom error types (the crate was already a transitive
    dependency).
  • Replace Option<NonEmpty<C>> where C is a collection type with the
    collection type itself; this makes the API more ergonomic.
  • Replace args in Execution with program and args; this makes the API a
    little less confusing as not everything is put into args. The name
    program was chosen as that's what std::process::Command::new uses.
  • Deleted a few unused builder.rs files.
  • Remove the UI dependency from Engine and tracking tasks from Runner to
    make it Send+Sync. The UI is moved into relevant main.rs files.

Before submitting this PR, please make sure:

  • You have added a few sentences describing the PR here.
  • You have added yourself or the appropriate individual as the assignee.
  • You have added at least one relevant code reviewer to the PR.
  • Your code builds clean without any errors or warnings.
  • You have added tests (when appropriate).
  • You have updated the README or other documentation to account for these
    changes (when appropriate).
  • You have added an entry to the relevant CHANGELOG.md (see
    "keep a changelog" for more information).
  • Your commit messages follow the conventional commit style.

This commit replaces the fast bloom filter implementation with a growable one.

A growable implementation is required as the bloom filter is used within a
generator; the number of elements in the bloom filter is unbounded and
dependent upon how many docker tasks are spawned rather than how many docker
tasks may spawn concurrently.

Included with these changes:

* Use `thiserror` for custom error types (the crate was already a transitive
  dependency).
* Replace `Option<NonEmpty<C>>` where C is a collection type with the
  collection type itself; this makes the API more ergonomic.
* Replace `args` in `Execution` with `program` and `args`; this makes the API a
  little less confusing as not everything is put into `args`. The name
  `program` was chosen as that's what `std::process::Command::new` uses.
* Deleted a few unused `builder.rs` files.
@peterhuene peterhuene merged commit e8c092c into stjude-rust-labs:main Feb 6, 2025
9 checks passed
@peterhuene peterhuene deleted the fix branch February 6, 2025 23: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.

2 participants