Fix the bake scan report's unsound absence-as-signal claim
Gate the summary on any unanswered key and on SetProjExtState's return, print one line per scanned key, and make the undo block stack RAII.
This commit is contained in:
@@ -196,32 +196,34 @@ BakeChainResult runBake(ReaSamplerProcessor& processor) {
|
||||
|
||||
// What the key holds now is the only evidence this side gets, and each of the five
|
||||
// non-answers is a different thing to go fix — collapsing them into one sentence is
|
||||
// what made a stale install indistinguishable from a refusal.
|
||||
// what made a stale install indistinguishable from a refusal. The three that are about
|
||||
// the KEY name it, because the landing prints one console line per key it scanned and
|
||||
// the key is what correlates the two in a multi-instance session.
|
||||
const wire::BakeAnswer answer =
|
||||
wire::classifyBakeAnswer(bridge.readReasamplerExtState(key), request);
|
||||
switch (answer.kind) {
|
||||
case wire::BakeAnswerKind::Answered:
|
||||
break;
|
||||
case wire::BakeAnswerKind::Unanswered:
|
||||
return fail(
|
||||
"the ReaSampler extension did not answer -- the request key still holds "
|
||||
"this exact request, untouched. Check the REAPER console: if the landing "
|
||||
"action printed a scan report just now, it DID run and that line says what "
|
||||
"it saw; if the console is silent, the action never ran at all");
|
||||
return fail("the ReaSampler extension did not answer " + key +
|
||||
" -- that key still holds this exact request, untouched. The "
|
||||
"landing action prints one REAPER console line per key it "
|
||||
"scanned; look for that key name there");
|
||||
case wire::BakeAnswerKind::Undecodable:
|
||||
return fail(
|
||||
"the extension answered in a format this plugin does not read -- the "
|
||||
"extension and ReaSampler 9000 are from different builds");
|
||||
case wire::BakeAnswerKind::Cleared:
|
||||
return fail(
|
||||
"the bake key came back empty -- either the request was cleared before "
|
||||
"an answer was written, or this build could not read whatever was there. "
|
||||
"The landing action's console scan report, if one appeared, names which");
|
||||
return fail("the bake key " + key +
|
||||
" came back empty -- either the request was cleared before an "
|
||||
"answer was written, or this build could not read whatever was "
|
||||
"there. Look for that key name in the landing action's console "
|
||||
"lines");
|
||||
case wire::BakeAnswerKind::ForeignRequest:
|
||||
return fail(
|
||||
"the bake key held a different pending request instead of an answer -- "
|
||||
"unexpected given the bake's single-threaded call flow; if this recurs, "
|
||||
"note the exact steps and file it");
|
||||
return fail("the bake key " + key +
|
||||
" held a different pending request instead of an answer -- "
|
||||
"unexpected given the bake's single-threaded call flow; if this "
|
||||
"recurs, note the exact steps and file it");
|
||||
case wire::BakeAnswerKind::ForeignOutcome:
|
||||
return fail("the extension answered a different bake request");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user