From 322ce34d77b4e2d8c6d721b156c02496d105741f Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 18 Nov 2015 11:30:54 -0800 Subject: 2458 - edit/: recipe side free of sandbox errors This is happening because of our recent generic changes, which trigger some post-processing transforms on all recipes even if we processed them before. We could clear 'interactive' inside 'reload' to avoid this, but random 'run' blocks in scenarios can still pick up errors from sandboxes earlier in a scenario. The right place to clear the 'interactive' recipe is right after we use it, in run_code_end(). --- edit/010-warnings.mu | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'edit/010-warnings.mu') diff --git a/edit/010-warnings.mu b/edit/010-warnings.mu index 6e5eeace..b2d927c2 100644 --- a/edit/010-warnings.mu +++ b/edit/010-warnings.mu @@ -54,6 +54,7 @@ recipe! update-sandbox sandbox:address:sandbox-data -> sandbox:address:sandbox-d 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 +#? $print [run-interactive], 10/newline *response, *warnings, *fake-screen, *trace, completed?:boolean <- run-interactive data { break-if *warnings @@ -61,6 +62,7 @@ recipe! update-sandbox sandbox:address:sandbox-data -> sandbox:address:sandbox-d *warnings <- new [took too long! ] } +#? $print [done with run-interactive], 10/newline ] # make sure we render any trace @@ -115,6 +117,39 @@ recipe foo [ ] ] +scenario run-hides-warnings-from-past-sandboxes [ + trace-until 100/app # trace too long + assume-screen 100/width, 15/height + 1:address:array:character <- new [] + 2:address:array:character <- new [get foo, x:offset] # invalid + 3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:address:array:character, 2:address:array:character + assume-console [ + press F4 # generate error + ] + run [ + event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data + ] + assume-console [ + left-click 3, 80 + press ctrl-k + type [add 2, 2] # valid code + press F4 # error should disappear + ] + run [ + event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data + ] + screen-should-contain [ + . run (F4) . + . ┊ . + .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. + . ┊ x. + . ┊add 2, 2 . + . ┊4 . + . ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. + . ┊ . + ] +] + scenario run-shows-missing-type-warnings [ trace-until 100/app # trace too long assume-screen 100/width, 15/height -- cgit 1.4.1-2-gfad0