Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cycle detection #43

Open
alandipert opened this issue Apr 27, 2023 · 0 comments
Open

Cycle detection #43

alandipert opened this issue Apr 27, 2023 · 0 comments

Comments

@alandipert
Copy link
Contributor

alandipert commented Apr 27, 2023

It's possible to set cells in formulas, which makes it possible to inadvertently introduce cycles that cause propagation to run forever. This could happen when a formula function sets one of its dependencies, directly or indirectly, in the midst of propagation.

Currently, when this happens, the browser locks up and the user is left to find the cycle manually 😂

Ken Tilton tells us that in his Cells library, he dynamically maintains a set of all active formulas. When a formula is invoked that is already present in the set, an error is signaled and the relevant dependency chain is printed.

I think we could probably easily do the same.

In addition, for cells created via macro, or that can otherwise carry source/line/column information, in our error message we could even potentially point to relevant places in code, to expedite debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant