zulip-flutter icon indicating copy to clipboard operation
zulip-flutter copied to clipboard

Enable unawaited_futures

Open PIG208 opened this issue 1 year ago • 10 comments

Fixes part of #731

PIG208 avatar Sep 10 '24 17:09 PIG208

TODO: TestGlobalStore's doInsertAccount implementation has a race condition for checking the invariants. Concurrently adding accounts allows you to bypass the check.

PIG208 avatar Sep 10 '24 19:09 PIG208

This sounds helpful!! It looks like we have an issue for it: #731 🙂

chrisbobbe avatar Sep 10 '24 19:09 chrisbobbe

This is stacked on top of #937.

PIG208 avatar Sep 12 '24 04:09 PIG208

This is stacked on top of #970 (dialog [nfc]: Wrap showErrorDialog's return value).

The PR is mostly small commits for refactors in a limited scope.

PIG208 avatar Sep 28 '24 04:09 PIG208

Other than api/core_test.dart as in the comment above (for which see #985), these changes all generally look like improvements to the code. And this is a PR that I expect would gather frequent conflicts as we merge other changes.

So I'd like to get this completed, even though as discussed on #731 we won't currently be able to enable the companion lint rule discarded_futures.

gnprice avatar Oct 05 '24 01:10 gnprice

So I'd like to get this completed

To help this along, I've just reviewed #970; over to you, Greg, for integration review on that.

chrisbobbe avatar Oct 05 '24 01:10 chrisbobbe

Updated the PR by cherry picking #970 and #985 and cleaning up some commit messages.

(The CI failure comes from #985)

PIG208 avatar Oct 07 '24 19:10 PIG208

Thanks! LGTM, except the commit that enables unawaited_futures should mention #731. As discussed on that issue, it sounds like we won't be enabling that other rule discarded_futures, so maybe the commit should say Fixes: ?

chrisbobbe avatar Oct 09 '24 23:10 chrisbobbe

I think we should keep #731 open because there is still some chance that we can use that rule, but not in the near future. Mentioning it in the commit message seems fine.

PIG208 avatar Oct 10 '24 00:10 PIG208

Thanks for the review! Updated the PR and fixed some more errors that appeared after rebasing (and applied #731)

PIG208 avatar Oct 11 '24 01:10 PIG208

Thanks for the revision! All looks good; merging, with one NFC commit on top:

1aef86814 api test [nfc]: Simplify some unawaited checks

gnprice avatar Oct 12 '24 00:10 gnprice