You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I delete a depended-on cell, I get a ReferenceError (correct behavior).
If I delete the contents of the depended-on cell, or rename the depended-on variable, I don't get a ReferenceError, but the variable value is undefined. If I manually reexecute the depending cell then I get a ReferenceError.
I think what's happening here is that we rewrite cells to import their dependencies, so e.g. if I have cells
const x = 7
and
x + x
then the second one is rewritten to
import { x } from [the first cell]
x + x
Now if you change the first cell (delete its contents or rename x), the second doesn't get rewritten, but importing the now-nonexistent variable returns undefined instead of throwing ReferenceError.
I think the right fix is to rewrite cells in light of current bindings when they are invalidated.
instead it should cause an error about an undefined variable (when you delete the cell defining the variable).
I think maybe we aren't cleaning up the mapping of exported variables to cells?
The text was updated successfully, but these errors were encountered: