Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ gungraun = "0.17.0"
indicatif = "0.18.4"
inventory = "0.3.21"
predicates = "3.1.3"
rayon = "1.10"
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.145"
tempfile = "3.21.0"
thread_local = "1.1"
toml = "0.9.5"
tracing = "0.1.41"
sha1 = "0.10"
Expand Down
2 changes: 2 additions & 0 deletions herostratus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ directories.workspace = true
eyre.workspace = true
gix.workspace = true
inventory.workspace = true
rayon.workspace = true
serde.workspace = true
serde_json.workspace = true
tempfile.workspace = true
thread_local.workspace = true
toml.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion herostratus/src/observer/commit_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
///
/// Rules see `CommitContext` + `Observation` -- they never touch the raw `gix::Commit`. Mailmap
/// resolution happens once in the ObserverEngine before constructing this struct.
#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct CommitContext {
pub oid: gix::ObjectId,
pub author_name: String,
Expand Down
2 changes: 2 additions & 0 deletions herostratus/src/observer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ pub use observation::Observation;
pub use observer::{DiffAction, Observer};
#[expect(unused)]
pub(crate) use observer_data::ObserverData;
#[expect(unused)]
pub(crate) use observer_engine::ObserverEngine;
pub use observer_factory::ObserverFactory;
4 changes: 2 additions & 2 deletions herostratus/src/observer/observer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use super::observation::Observation;
/// 2. Implement the [Observer] trait in the [impls](super::impls) module
/// 3. Register the observer via [inventory::submit!] with an
/// [ObserverFactory](super::ObserverFactory)
pub trait Observer {
pub trait Observer: Send {
/// The observation variant this observer emits.
fn emits(&self) -> std::mem::Discriminant<Observation>;

Expand Down Expand Up @@ -59,7 +59,7 @@ pub trait Observer {
/// Return [DiffAction::Cancel] to stop receiving further changes for this commit.
fn on_diff_change(
&mut self,
_change: &gix::object::tree::diff::Change,
_change: &gix::object::tree::diff::ChangeDetached,
_repo: &gix::Repository,
) -> eyre::Result<DiffAction> {
Ok(DiffAction::Cancel)
Expand Down
3 changes: 1 addition & 2 deletions herostratus/src/observer/observer_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ use super::commit_context::CommitContext;
use super::observation::Observation;

/// Messages sent through the channel from the ObserverEngine to the RuleEngine.
#[derive(Debug)]
#[expect(unused)]
#[derive(Debug, PartialEq, Eq)]
pub enum ObserverData {
/// Begins a new commit. Sent once before any observations for that commit.
CommitStart(CommitContext),
Expand Down
Loading