Skip to content

Commit

Permalink
feat(query): package changes reason (#9240)
Browse files Browse the repository at this point in the history
### Description

Plumbing through reason for why a package changed for query. Adds a
`reason` field which is a union of the different reasons a package could
be added.

This can be reviewed commit by commit, although there is a little bit of
churn around types and some behavior.

### Testing Instructions

Added some tests to `affected.t`
  • Loading branch information
NicholasLYang authored Oct 10, 2024
1 parent dc705a2 commit 5c93793
Show file tree
Hide file tree
Showing 16 changed files with 697 additions and 314 deletions.
147 changes: 0 additions & 147 deletions crates/turborepo-lib/src/global_deps_package_change_mapper.rs

This file was deleted.

1 change: 0 additions & 1 deletion crates/turborepo-lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ mod engine;

mod framework;
mod gitignore;
mod global_deps_package_change_mapper;
pub(crate) mod globwatcher;
mod hash;
mod opts;
Expand Down
4 changes: 3 additions & 1 deletion crates/turborepo-lib/src/package_changes_watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,9 @@ impl Subscriber {
}
}
}
Ok(PackageChanges::Some(mut filtered_pkgs)) => {
Ok(PackageChanges::Some(filtered_pkgs)) => {
let mut filtered_pkgs: HashSet<WorkspacePackage> =
filtered_pkgs.into_keys().collect();
// If the root package has changed, we only send it if we have root
// tasks. Otherwise it's not worth sending as it will only
// pollute up the output logs
Expand Down
Loading

0 comments on commit 5c93793

Please sign in to comment.