feat(local): aggregate blocked-on-dependency reporting by dependency
With cascade detection live, a run surfaced ~30 root-cause dependencies, but the "blocked on a dependency" list repeated the same dependency once per fingerprint group (rstan x4, lpsymphony x4, salso x2, ...), burying the priority. Aggregate across all groups by the dependency each dependent waits on: expose `blocked_map` (package -> dependency) from build_triage_report, and add `blocked_by_dependency()` which dedupes dependents and ranks dependencies by how many they block. One line per dependency, sorted by impact, in the proposer and tracker (log + issue). Replaces the per-group `blocked_summary`.
This commit is contained in:
parent
118a92889f
commit
1b57d45c80
1 changed files with 68 additions and 39 deletions
|
|
@ -148,21 +148,20 @@ for (r in report) {
|
|||
}
|
||||
}
|
||||
|
||||
# Groups blocked on a dependency (e.g. RcppParallel dependents) are reported,
|
||||
# not proposed: fixing the named dependency clears them all at once.
|
||||
blocked <- Filter(
|
||||
function(r) length(r$blocked_packages) > 0L,
|
||||
report
|
||||
)
|
||||
# Packages blocked on a dependency are reported (aggregated by dependency,
|
||||
# ranked by impact), not proposed: fixing the named dependency clears the batch.
|
||||
blocked <- blocked_by_dependency(report)
|
||||
if (length(blocked) > 0L) {
|
||||
cat("\nBlocked on a dependency (fix the dependency, not each dependent):\n")
|
||||
for (r in blocked) {
|
||||
cat(sprintf(
|
||||
" %s: %d package(s) fail because %s does not build\n",
|
||||
toString(r$blocked_on),
|
||||
length(r$blocked_packages),
|
||||
toString(r$blocked_on)
|
||||
))
|
||||
n_blocked_pkgs <- length(unique(unlist(
|
||||
lapply(report, function(r) r$blocked_packages)
|
||||
)))
|
||||
cat(sprintf(
|
||||
"\nBlocked on a dependency (%d dependencies block %d dependents; fix the dependency, not each dependent):\n",
|
||||
length(blocked),
|
||||
n_blocked_pkgs
|
||||
))
|
||||
for (b in blocked) {
|
||||
cat(sprintf(" %-20s %5d dependent(s)\n", b$dependency, b$n_packages))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue