about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-09-15 20:22:13 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-09-15 20:22:13 -0700
commit5c6587d004afa038a57da9e9e30b2b8944ca0201 (patch)
tree46d18c77a577858864d9a8a640cec38acdf424ff
parent06584c523ae1362d59c9c9285deaa48c13c4d123 (diff)
downloadmu-5c6587d004afa038a57da9e9e30b2b8944ca0201.tar.gz
2203 - show recipe warnings in 'mu sandbox'
-rw-r--r--sandbox/005-sandbox.mu3
-rw-r--r--sandbox/010-warnings.mu14
2 files changed, 8 insertions, 9 deletions
diff --git a/sandbox/005-sandbox.mu b/sandbox/005-sandbox.mu
index f3cf94a8..9cbd1d08 100644
--- a/sandbox/005-sandbox.mu
+++ b/sandbox/005-sandbox.mu
@@ -224,7 +224,7 @@ recipe! render-sandbox-side [
   row <- add row, 1
   draw-horizontal screen, row, left, right, 9473/horizontal-double
   sandbox:address:sandbox-data <- get *env, sandbox:offset
-  row, screen <- render-sandboxes screen, sandbox, left, right, row
+  row, screen <- render-sandboxes screen, sandbox, left, right, row, env
   clear-rest-of-screen screen, row, left, left, right
   reply screen/same-as-ingredient:0
 ]
@@ -236,6 +236,7 @@ recipe render-sandboxes [
   left:number <- next-ingredient
   right:number <- next-ingredient
   row:number <- next-ingredient
+  env:address:programming-environment-data <- next-ingredient
   reply-unless sandbox, row/same-as-ingredient:4, screen/same-as-ingredient:0
   screen-height:number <- screen-height screen
   at-bottom?:boolean <- greater-or-equal row, screen-height
diff --git a/sandbox/010-warnings.mu b/sandbox/010-warnings.mu
index 077deafb..39dc5691 100644
--- a/sandbox/010-warnings.mu
+++ b/sandbox/010-warnings.mu
@@ -12,14 +12,7 @@ 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 1/errors-found, env/same-as-ingredient:0, screen/same-as-ingredient:1
-  }
-  reply 0/no-errors-found, env/same-as-ingredient:0, screen/same-as-ingredient:1
+  reply 0/show-recipe-warnings-in-sandboxes, env/same-as-ingredient:0, screen/same-as-ingredient:1
 ]
 
 before <render-components-end> [
@@ -59,6 +52,11 @@ after <render-sandbox-trace-done> [
     sandbox-warnings:address:array:character <- get *sandbox, warnings:offset
     break-unless sandbox-warnings
     *response-starting-row <- copy 0  # no response
+    {
+      break-unless env
+      recipe-warnings:address:array:character <- get *env, recipe-warnings:offset
+      row, screen <- render-string screen, recipe-warnings, left, right, 1/red, row
+    }
     row, screen <- render-string screen, sandbox-warnings, left, right, 1/red, row
     # don't try to print anything more for this sandbox
     jump +render-sandbox-end:label