Enable unawaited_futures
Fixes part of #731
TODO: TestGlobalStore's doInsertAccount implementation has a race condition for checking the invariants. Concurrently adding accounts allows you to bypass the check.
This sounds helpful!! It looks like we have an issue for it: #731 🙂
This is stacked on top of #937.
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.
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.
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.
Updated the PR by cherry picking #970 and #985 and cleaning up some commit messages.
(The CI failure comes from #985)
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: ?
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.
Thanks for the review! Updated the PR and fixed some more errors that appeared after rebasing (and applied #731)
Thanks for the revision! All looks good; merging, with one NFC commit on top:
1aef86814 api test [nfc]: Simplify some unawaited checks