+BLOCKED, +UNBLOCKED, and +BLOCKING tags

These are somewhat expensive tags, as they require reference to values
outside of the task itself.

To accomplish this, the replica supplies a pre-computed DependencyMap
that is only calculated once per replica, and only from the working set.
This commit is contained in:
Dustin J. Mitchell
2022-02-22 02:33:22 +00:00
parent 47e213d6ec
commit 6f48f715ac
8 changed files with 318 additions and 21 deletions

View File

@@ -406,9 +406,12 @@ mod test {
let task = replica.get_task(uuids[0]).unwrap().unwrap();
assert_eq!(
task_column(&task, &column, &working_set),
s!("+PENDING +bar +foo")
s!("+PENDING +UNBLOCKED +bar +foo")
);
let task = replica.get_task(uuids[2]).unwrap().unwrap();
assert_eq!(task_column(&task, &column, &working_set), s!("+PENDING"));
assert_eq!(
task_column(&task, &column, &working_set),
s!("+PENDING +UNBLOCKED")
);
}
}

View File

@@ -15,12 +15,13 @@ macro_rules! argv {
// NOTE: in Rust 1.56.0, this can be changed to HashSet::from([..])
#[cfg(test)]
macro_rules! set(
{ $($key:expr),+ } => {
{ $($key:expr),* $(,)? } => {
{
#[allow(unused_mut)]
let mut s = ::std::collections::HashSet::new();
$(
s.insert($key);
)+
)*
s
}
};