diff options
-rw-r--r-- | sandbox/005-sandbox.mu | 2 | ||||
-rw-r--r-- | sandbox/010-warnings.mu | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/sandbox/005-sandbox.mu b/sandbox/005-sandbox.mu index ddfbef31..34b446a1 100644 --- a/sandbox/005-sandbox.mu +++ b/sandbox/005-sandbox.mu @@ -147,7 +147,7 @@ recipe run-sandboxes [ curr:address:sandbox-data <- get *env, sandbox:offset { break-unless curr - update-sandbox curr + update-sandbox curr, env curr <- get *curr, next-sandbox:offset loop } diff --git a/sandbox/010-warnings.mu b/sandbox/010-warnings.mu index ece806c3..d32f6e8e 100644 --- a/sandbox/010-warnings.mu +++ b/sandbox/010-warnings.mu @@ -12,6 +12,12 @@ recipe! update-recipes [ in:address:array:character <- restore [recipes.mu] recipe-warnings:address:address:array:character <- get-address *env, recipe-warnings:offset *recipe-warnings <- reload in + # if recipe editor has errors, stop + { + break-unless *recipe-warnings + status:address:array:character <- new [errors found] + update-status screen, status, 1/red + } reply 0/show-recipe-warnings-in-sandboxes, env/same-as-ingredient:0, screen/same-as-ingredient:1 ] @@ -32,11 +38,18 @@ container sandbox-data [ recipe! update-sandbox [ local-scope sandbox:address:sandbox-data <- next-ingredient + env:address:programming-environment-data <- next-ingredient data:address:array:character <- get *sandbox, data:offset response:address:address:array:character <- get-address *sandbox, response:offset warnings:address:address:array:character <- get-address *sandbox, warnings:offset trace:address:address:array:character <- get-address *sandbox, trace:offset fake-screen:address:address:screen <- get-address *sandbox, screen:offset + recipe-warnings:address:array:character <- get *env, recipe-warnings:offset + { + break-unless recipe-warnings + *warnings <- copy recipe-warnings + reply + } *response, *warnings, *fake-screen, *trace, completed?:boolean <- run-interactive data { break-if *warnings @@ -98,6 +111,8 @@ scenario run-instruction-and-print-warnings [ ] ] +# todo: print warnings in file even if you can't run a sandbox + scenario run-instruction-and-print-warnings-only-once [ trace-until 100/app # trace too long assume-screen 50/width, 10/height |