feat(local): detect dependency-cascade failures generally, not just RcppParallel

The first trial-build gate run correctly went red: the 10 auto-proposed
tbb-stddef packages (BFpack, BayesERtools, GMLTM, ...) all fail while building
their shared `rstan` dependency, not in their own code -- the `tbb/tbb_stddef.h`
error is in rstan's Module.cpp. So a per-package makevars entry is useless for
them; they are blocked on rstan (which already has an entry). This is the same
cascade the RcppParallel `applies_to` guard catches, but the tbb-stddef
signature is generic and had no such pin.

Add `failing_dependency(error_text, package)`: when the log shows a DIFFERENT
package failed to compile ("Failed to build source package X", "compilation
failed for package 'X'", ...), that package is the real cause. build_triage_report
now blocks any package whose every failing build is such a cascade -- reported
as blocked_on the dependency, never proposed a bogus entry. A package that fails
in its OWN compilation is still proposed. This unifies the applies_to and
data-driven cases into one `blocked_packages` / `blocked_on` model.

- report/proposer/blocked_summary now count the actually-blocked packages
- blocked note shows even when a group also has genuine proposals
- tests cover the rstan-cascade vs own-compile split (with the real log strings)
This commit is contained in:
Patrick Schratz 2026-07-15 21:33:54 +00:00
commit c98aaa548f
No known key found for this signature in database
GPG key ID: 62050D5BC68AB6DC

View file

@ -194,15 +194,17 @@ for (r in report) {
)
cat(paste0(" ", gsub("\n", "\n ", j)), "\n", sep = "")
}
} else if (!is.null(r$blocked_on)) {
} else if (r$auto_proposable && length(r$blocked_packages) == 0L) {
cat(" (all affected packages already have a registry entry)\n")
}
# Blocked packages are shown even when the group also has proposals.
if (length(r$blocked_packages) > 0L) {
cat(sprintf(
" (blocked on %s -- these %d package(s) fail because that dependency does not build; fix %s, do not patch each dependent)\n",
" (blocked on %s -- %d package(s) fail because that dependency does not build; fix %s, do not patch each dependent)\n",
toString(r$blocked_on),
length(r$packages),
length(r$blocked_packages),
toString(r$blocked_on)
))
} else if (r$auto_proposable) {
cat(" (all affected packages already have a registry entry)\n")
}
}