quadratic icon indicating copy to clipboard operation
quadratic copied to clipboard

fix: prevent circular references

Open jimniels opened this issue 1 year ago • 3 comments

If somebody references the cell they're currently in, the app just gets stuck in an infinite loop with no way to exit except refresh the page

CleanShot 2023-05-05 at 08 49 21@2x

CleanShot 2023-05-05 at 08 49 39@2x

jimniels avatar May 05 '23 15:05 jimniels

This is fixed in a individual cell, but you can still create a circular ref with two cells

davidkircos avatar Oct 24 '23 19:10 davidkircos

I confirmed that individual cell reference are now caught. I can cause the infinite loop by:

  1. Code cell at (0,0) that reads from cell (1,0)
  2. Code cell at (1,0) that reads from cell (0,0)

Screenshot 2023-11-22 at 12 43 09 PM

I would expect at least the ability to cancel the execution, but would prefer to just generate an error in the code editor's console.

ddimaria avatar Nov 22 '23 19:11 ddimaria

Can now cancel, marking to close pending discussion

luke-quadratic avatar Apr 24 '24 15:04 luke-quadratic