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

@ -150,14 +150,17 @@ 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) !is.null(r$blocked_on), report)
blocked <- Filter(
function(r) length(r$blocked_packages) > 0L,
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$packages),
length(r$blocked_packages),
toString(r$blocked_on)
))
}