source-academy/modules

[RUNE]: Rune tab should disappear if the program does not use show

Closed this issue · 2 comments

Currently, the display of the previous Run remains in the Rune tab if the next Run does not use show.

Example:

import { show, heart } from 'rune';
show(heart);

shows the heart. Now replace the program with

"something else";

Now the rune tab remains open, and shows the heart.

This is inconsistent with the curve module, which correctly removes the curve tab in a similar situation. Example:

import { make_point,  draw_connected_full_view 
} from "curve";

const π = math_PI; 

const unit_circle = t => make_point(
    math_cos(2 * π * t),                                       // x
    math_sin(2 * π * t));                                      // y

draw_connected_full_view(100)(unit_circle);

// "something else";

I was unable to reproduce this issue.

Perhaps the observed phenomenon was caused by a program run failure? When a program has run, but is then updated and rerun with broken code that causes an error, the error is printed to the REPL without updating/removing existing module tabs. If the REPL is hidden, this may be missable.

I was unable to reproduce this issue.

Neither can I, seems ok to close now.