Preserve synth compile failures
This commit is contained in:
parent
ecd6d143bf
commit
44ce1fc0b7
2 changed files with 7 additions and 0 deletions
|
|
@ -73,6 +73,7 @@ internal sealed class AquariumSynthHost : IDisposable
|
|||
if (runtime.DesiredKey != desiredKey)
|
||||
{
|
||||
runtime.DesiredKey = desiredKey;
|
||||
runtime.FailedKey = "";
|
||||
runtime.ScriptChangedAt = timeSeconds;
|
||||
runtime.SoundCache.Clear();
|
||||
if (runtime.State != AquariumSynthPatchCompileState.Compiling)
|
||||
|
|
@ -83,6 +84,7 @@ internal sealed class AquariumSynthHost : IDisposable
|
|||
|
||||
if (runtime.State == AquariumSynthPatchCompileState.Compiling ||
|
||||
runtime.ReadyKey == desiredKey ||
|
||||
runtime.FailedKey == desiredKey ||
|
||||
runtime.DesiredKey != desiredKey ||
|
||||
timeSeconds - runtime.ScriptChangedAt < CompileDebounceSeconds)
|
||||
{
|
||||
|
|
@ -91,6 +93,7 @@ internal sealed class AquariumSynthHost : IDisposable
|
|||
|
||||
if (faust is null)
|
||||
{
|
||||
runtime.FailedKey = desiredKey;
|
||||
SetStatus(runtime, AquariumSynthPatchCompileState.Failed, faustLoadError ?? "bundled Faust toolchain not found", patch.FaustCompileRevision);
|
||||
return;
|
||||
}
|
||||
|
|
@ -120,6 +123,7 @@ internal sealed class AquariumSynthHost : IDisposable
|
|||
runtime.Compiled?.Dispose();
|
||||
runtime.Compiled = compiled;
|
||||
runtime.ReadyKey = compileKey;
|
||||
runtime.FailedKey = "";
|
||||
runtime.SoundCache.Clear();
|
||||
runtime.CompileTask = null;
|
||||
runtime.SetStatus(AquariumSynthPatchCompileState.Ready, $"ready in {compiled.CompileMilliseconds:0} ms", revision, timeSeconds);
|
||||
|
|
@ -134,6 +138,7 @@ internal sealed class AquariumSynthHost : IDisposable
|
|||
runtime.Compiled?.Dispose();
|
||||
runtime.Compiled = null;
|
||||
runtime.ReadyKey = "";
|
||||
runtime.FailedKey = compileKey;
|
||||
runtime.SoundCache.Clear();
|
||||
runtime.CompileTask = null;
|
||||
runtime.SetStatus(AquariumSynthPatchCompileState.Failed, ex.Message, revision, timeSeconds);
|
||||
|
|
@ -292,6 +297,7 @@ internal sealed class AquariumSynthHost : IDisposable
|
|||
public readonly Dictionary<string, CachedSound> SoundCache = new(StringComparer.Ordinal);
|
||||
public string DesiredKey { get; set; } = "";
|
||||
public string ReadyKey { get; set; } = "";
|
||||
public string FailedKey { get; set; } = "";
|
||||
public float ScriptChangedAt { get; set; }
|
||||
public CompiledFaustPatch? Compiled { get; set; }
|
||||
public Task? CompileTask { get; set; }
|
||||
|
|
|
|||
|
|
@ -72,3 +72,4 @@
|
|||
{"timestamp":"2026-05-12T19:57:28+01:00","topic":"debug-dropdown-overlay-ownership","lesson":"Dropdown option lists are transient overlay panels, not row layout. Keep the field row's layout height constant, align the popup to the value field bounds, flip above the field when viewport space below is worse, scroll long lists inside the popup, and close the modal on outside click before other controls can react.","files":["src/Aquarium.Engine/Render/Ui/DebugUi.cs","state/evidence.jsonl"],"source":"user dropdown layout correction"}
|
||||
{"timestamp":"2026-05-12T20:04:11+01:00","topic":"debug-ui-mouse-input-capture","lesson":"Renderer input capture must include both keyboard ownership and mouse ownership. If Debug UI consumes wheel or mouse interaction but the renderer only reports keyboard capture, the same wheel event leaks into client camera/runtime controls after the overlay handles it.","files":["src/Aquarium.Engine/Render/D3D12Renderer.cs","state/evidence.jsonl"],"source":"user dropdown scroll capture correction"}
|
||||
{"timestamp":"2026-05-12T20:20:42+01:00","topic":"synth-playground-control-authority","lesson":"The synth playground's source text owns recompilation through the synth host compile key and debounce; Play owns only manual trigger firing. Do not make Play force compilation or present compile status as an interactive control when it is only state feedback.","files":["src/Aquarium.Engine/Render/D3D12Renderer.cs","state/evidence.jsonl"],"source":"user synth playground UI correction"}
|
||||
{"timestamp":"2026-05-12T21:07:53+01:00","topic":"synth-failed-compile-state","lesson":"A failed synth compile key must be remembered separately from the ready compile key. If failed source leaves ReadyKey empty while DesiredKey still points at the same bad script, the host retries every frame and the UI appears stuck on Compiling instead of showing Failed until the source changes.","files":["src/Aquarium.Engine/Audio/AquariumSynthHost.cs","state/evidence.jsonl"],"source":"user failed compilation status correction"}
|
||||
|
|
|
|||
Loading…
Reference in a new issue