Skip to content

Add await or ignore to future-returning methods defined in Dart SDK#184229

Merged
auto-submit[bot] merged 5 commits into
flutter:masterfrom
victorsanni:dart-unawaited
Apr 2, 2026
Merged

Add await or ignore to future-returning methods defined in Dart SDK#184229
auto-submit[bot] merged 5 commits into
flutter:masterfrom
victorsanni:dart-unawaited

Conversation

@victorsanni

@victorsanni victorsanni commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Fixes #184317
Part of #181513

@github-actions github-actions Bot added a: tests "flutter test", flutter_test, or one of our tests tool Affects the "flutter" command-line tool. See also t: labels. framework flutter/packages/flutter repository. See also f: labels. d: examples Sample code and demos f: integration_test The flutter/packages/integration_test plugin labels Mar 27, 2026
@victorsanni victorsanni added the CICD Run CI/CD label Mar 27, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses unawaited futures across various packages and tests by adding await to asynchronous calls—such as close, spawn, and runZoned—or applying // ignore: unawaited_futures where intentional. It also refactors file creation in snippets_test.dart and adds a new test case for ID matching in vm_service_golden_client_test.dart. Feedback suggests using asynchronous writeAsString instead of writeAsStringSync in snippets_test.dart to maintain consistency with the async test environment.

..writeAsStringSync('''
final File exampleFile = memoryFileSystem.file(examplePath);
await exampleFile.create(recursive: true);
exampleFile.writeAsStringSync('''

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with the async nature of this test and to avoid blocking, consider using the asynchronous writeAsString method instead of writeAsStringSync.

Suggested change
exampleFile.writeAsStringSync('''
await exampleFile.writeAsString('''

..writeAsStringSync('''
final File exampleFile = memoryFileSystem.file(examplePath);
await exampleFile.create(recursive: true);
exampleFile.writeAsStringSync('''

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with the async nature of this test and to avoid blocking, consider using the asynchronous writeAsString method instead of writeAsStringSync.

Suggested change
exampleFile.writeAsStringSync('''
await exampleFile.writeAsString('''

@github-actions github-actions Bot removed the CICD Run CI/CD label Mar 27, 2026
@victorsanni victorsanni added the CICD Run CI/CD label Mar 27, 2026
@randomizedcoder

This comment was marked as off-topic.

@stuartmorgan-g

This comment was marked as off-topic.

@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 1, 2026
@victorsanni victorsanni added the CICD Run CI/CD label Apr 1, 2026
@victorsanni victorsanni requested a review from dkwingsmt April 1, 2026 23:17

@dkwingsmt dkwingsmt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@victorsanni victorsanni added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 2, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue Apr 2, 2026
Merged via the queue into flutter:master with commit 071df4b Apr 2, 2026
159 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 2, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 2, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 2, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Apr 2, 2026
flutter/flutter@3d69471...0f401ee

2026-04-02 [email protected] Remove isSizedToContent from _window_linux.dart. (flutter/flutter#184506)
2026-04-02 [email protected] Windows: Get graphics adapter from engine instead of view (flutter/flutter#184479)
2026-04-02 [email protected] Reduce number of mallocs in FFI call (flutter/flutter#184166)
2026-04-02 [email protected] Handle events without a device (flutter/flutter#184163)
2026-04-02 [email protected] Implement tooltip windows on Linux (flutter/flutter#182348)
2026-04-02 [email protected] Roll Skia from bdeebacf23c8 to bb9fd8653739 (4 revisions) (flutter/flutter#184494)
2026-04-02 [email protected] Implement popup windows for macOS (flutter/flutter#182371)
2026-04-02 [email protected] Roll Fuchsia Linux SDK from fV-JIWUt4FQGeDtEe... to BFLjk6Uwd0gs_Hkdk... (flutter/flutter#184492)
2026-04-02 [email protected] Add await or ignore to future-returning methods defined in Dart SDK (flutter/flutter#184229)
2026-04-02 [email protected] Roll Dart SDK from 043a2bfd56ff to d84bdfeb45eb (2 revisions) (flutter/flutter#184487)
2026-04-01 [email protected] Roll Skia from c2363c39c283 to bdeebacf23c8 (9 revisions) (flutter/flutter#184480)
2026-04-01 [email protected] Remove sliver_test_utils cross-import from sliver_app_bar_test (flutter/flutter#184193)
2026-04-01 [email protected] Improve error message when `dart-define` content are not `base64 encoded` and add more test cases (flutter/flutter#184219)
2026-04-01 [email protected] Replace usages of `MediaQuery.of(context).property` with `MediaQuery.propertyOf(context)` (flutter/flutter#184211)
2026-04-01 [email protected] [ios] Add opt-in inline prediction text input support (flutter/flutter#183650)
2026-04-01 [email protected] [fix-forward] fix build_android_host_app_with_module_source integration test (flutter/flutter#184466)
2026-04-01 [email protected] Update style guide (flutter/flutter#184478)
2026-04-01 [email protected] Roll Packages from b04f3e5 to b3fcf14 (3 revisions) (flutter/flutter#184474)
2026-04-01 [email protected] Warn about slow SwiftPM downloads and centralize SwiftPM cache (flutter/flutter#183747)
2026-04-01 [email protected] Inject FlutterFramework dependency in iOS Add2App swift packages (flutter/flutter#184365)
2026-04-01 [email protected] Prepare for skills adoption (flutter/flutter#184129)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@victorsanni victorsanni deleted the dart-unawaited branch May 5, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: tests "flutter test", flutter_test, or one of our tests CICD Run CI/CD d: examples Sample code and demos f: integration_test The flutter/packages/integration_test plugin framework flutter/packages/flutter repository. See also f: labels. tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

examples/image_list: missing await on HttpResponse.close()

4 participants