#3087: name each effect the placeholder budget skips

A skipped instance was reported through the capped detail list, so past 20 effect losses it was only counted. It now goes through the per-effect grouping under a key of its own, so it is named like any effect without a counterpart and is not merged into a kept instance's line.
This commit is contained in:
arnav-hiwarkar committed 2026-11-12 11:00:10 +05:30
1 parent a4d0952115
commit 98b8e69f7f
2 files changed
+5 -2

No files matched your search

+4 -2
View File
@@ -94,8 +94,10 @@ pub(crate) fn import_effects<'f, 'a>(
}
if found.is_none() && col.placeholder_cost >= crate::import::placeholder::MAX_COST {
// The import's placeholder budget is spent: the definitions (shared by many instances)
// are not read again. Its own line: grouped, it would read as kept.
col.lose(LossCategory::Effects, format!("{lost}, not kept (past the import's placeholder parameters)"));
// are not read again. Named like any effect without a counterpart, in a group of its
// own (with the kept instances it would read as kept).
let key = format!("{} (not kept)", fx.match_name());
col.lose_unmapped_effect(&key, format!("{lost}, not kept (past the import's placeholder parameters)"));
continue;
}
let params = defs.params(&fx);
@@ -180,6 +180,7 @@ fn an_effect_past_the_spent_budget_gets_no_placeholder() {
let found = losses(&r, LossCategory::Effects, "Big Fx");
assert_eq!(found.iter().filter(|d| d.contains("and the ones after it not kept")).count(), 1, "{found:?}");
assert!(found.iter().any(|d| d.contains("not kept (past the import's placeholder parameters)")), "{found:?}");
assert!(found.iter().any(|d| d.contains("kept without rendering") && !d.contains("more like it")), "the kept instance alone: {found:?}");
}
/// `bytes` with the layer's instance of `match_name` (its `tdmn` and `sspc`) repeated after it.