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

Add protection against missing awaits in runtime code #199

Open
rpanic opened this issue Sep 11, 2024 · 0 comments
Open

Add protection against missing awaits in runtime code #199

rpanic opened this issue Sep 11, 2024 · 0 comments

Comments

@rpanic
Copy link
Member

rpanic commented Sep 11, 2024

A common pitfall that users encounter is to forget to add await to state.set() calls. This mostly leads to ambigous errors and takes up a lot of time to debug - especially when doing community support.
We can approach this problem from two angles:

  1. Add better eslint coverage for missing awaits in the starter-kit
  2. Build in a framework-based solution that enforces the linearity of any runtime or protocol code. This can be done pretty easily by doing a analyzing step of all user-built code where we keep track of a global context (and how much it has been entered) for all state calls and add a slight (internally awaited) delay to force the js evaluation loop to continue elsewhere to catch missing awaits
@rpanic rpanic moved this to Todo in Main Board Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant