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

Error handling and circular dependency management. #19

Merged
merged 4 commits into from
Nov 29, 2024
Merged

Conversation

cesarParra
Copy link
Owner

The following changes and improvements were introduced:

  • Computed and effects now track if their internal state during their execution. They might be "computing", have an "error" or be "ready".
  • When a circular dependency is detected, an exception is thrown instead of trying the computation, to avoid infinite loops from happening.
  • When an error occurs during an execution of a computed value, the computed goes into an error state, which it keeps until recomputation is done and fixes the issue. This fixes potential infinite loops when executing computed code with errors. Reading a computed in an error state surfaces the error

@cesarParra cesarParra merged commit 36ccb26 into main Nov 29, 2024
1 check passed
@cesarParra cesarParra deleted the error-handling branch November 29, 2024 18:24
cesarParra added a commit that referenced this pull request Nov 29, 2024
@cesarParra cesarParra restored the error-handling branch November 29, 2024 19:03
Copy link

🎉 This PR is included in version 1.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

1 participant