unawaited patch
never executes
#26
Labels
needs feedback
Looking for justification via real world use cases
patch
never executes
#26
promises in convex mutations usually run to completion, even if not awaited.
for example,
will execute the patch, even though
patch
is async and we're not awaiting it. But this isn't true in Ents, because Ents use lazy promises. So a forgotten await can turn into a silent bug. i.e. this code, which looks identical to the above, actually is a no-op:If we could make mutating promises like
patch
andinsert
non-lazy, that would help avoid potential bugs.in the meantime, enabling the linter
@typescript-eslint/no-floating-promises
https://typescript-eslint.io/rules/no-floating-promises/ makes forgotten-await bug more likely to be found.The text was updated successfully, but these errors were encountered: