[M] Change in dart/sdk[main]: [linter] Makes `unawaited_futures` report for `FutureOr`

0 views
Skip to first unread message

FMorschel (Gerrit)

unread,
Jul 6, 2026, 2:16:20 PM (9 days ago) Jul 6
to dart-analys...@google.com, rev...@dartlang.org

FMorschel has uploaded the change for review

Commit message

[linter] Makes `unawaited_futures` report for `FutureOr`
Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864

Change information

Files:
  • M pkg/linter/lib/src/rules/unawaited_futures.dart
  • M pkg/linter/messages.yaml
  • M pkg/linter/test/rules/unawaited_futures_test.dart
Change size: M
Delta: 3 files changed, 36 insertions(+), 20 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
Gerrit-Change-Number: 520882
Gerrit-PatchSet: 1
Gerrit-Owner: FMorschel <g...@fmorschel.dev>
Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
unsatisfied_requirement
open
diffy

Samuel Rawlins (Gerrit)

unread,
Jul 6, 2026, 3:03:47 PM (9 days ago) Jul 6
to FMorschel, Brian Wilkerson, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Brian Wilkerson and FMorschel

Samuel Rawlins voted and added 2 comments

Votes added by Samuel Rawlins

Code-Review+1

2 comments

File pkg/linter/lib/src/rules/unawaited_futures.dart
Line 35, Patchset 1 (Latest): // This rule does concern itself with `FutureOr`.
Samuel Rawlins . unresolved

Dead comment?

File pkg/linter/messages.yaml
Line 13808, Patchset 1 (Latest): It's easy to forget `await` in `async` methods as naming conventions usually don't
Samuel Rawlins . unresolved

Thanks for this!

Open in Gerrit

Related details

Attention is currently required from:
  • Brian Wilkerson
  • FMorschel
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
Gerrit-Change-Number: 520882
Gerrit-PatchSet: 1
Gerrit-Owner: FMorschel <g...@fmorschel.dev>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
Gerrit-Attention: FMorschel <g...@fmorschel.dev>
Gerrit-Comment-Date: Mon, 06 Jul 2026 19:03:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

FMorschel (Gerrit)

unread,
Jul 6, 2026, 3:08:08 PM (9 days ago) Jul 6
to Samuel Rawlins, Brian Wilkerson, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Brian Wilkerson and Samuel Rawlins

FMorschel added 2 comments

File pkg/linter/lib/src/rules/unawaited_futures.dart
Line 35, Patchset 1 (Latest): // This rule does concern itself with `FutureOr`.
Samuel Rawlins . unresolved

Dead comment?

FMorschel

I've copied this over from `discarded_futures`. Would you prefer I remove these from both?

File pkg/linter/messages.yaml
Line 13808, Patchset 1 (Latest): It's easy to forget `await` in `async` methods as naming conventions usually don't
Samuel Rawlins . resolved

Thanks for this!

FMorschel

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Brian Wilkerson
  • Samuel Rawlins
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
Gerrit-Change-Number: 520882
Gerrit-PatchSet: 1
Gerrit-Owner: FMorschel <g...@fmorschel.dev>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
Gerrit-Comment-Date: Mon, 06 Jul 2026 19:08:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Samuel Rawlins <sraw...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Brian Wilkerson (Gerrit)

unread,
Jul 7, 2026, 2:27:14 PM (8 days ago) Jul 7
to FMorschel, Brian Wilkerson, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org
Attention needed from FMorschel and Samuel Rawlins

Brian Wilkerson voted and added 1 comment

Votes added by Brian Wilkerson

Code-Review+1

1 comment

File pkg/linter/lib/src/rules/unawaited_futures.dart
Line 35, Patchset 1 (Latest): // This rule does concern itself with `FutureOr`.
Samuel Rawlins . unresolved

Dead comment?

FMorschel

I've copied this over from `discarded_futures`. Would you prefer I remove these from both?

Brian Wilkerson

I haven't looked at `discarded_futures`, but the point of the comment in this location was presumably to explain why the absence of handling for `FutureOr` wasn't considered a bug. It was impossible for a reader to know why it wasn't there without the comment. (Not that the comment really answered the question anyway.)

Now that `FutureOr` is handled, the comment isn't helpful. A reader is unlikely to wonder "why is this handling FutureOr?" (nor would the revised comment answer that question if they did).

Hence the request to delete the comment with this change.

Your choice as to whether to delete it from `discarded_futures`.

Open in Gerrit

Related details

Attention is currently required from:
  • FMorschel
  • Samuel Rawlins
Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
    Gerrit-Change-Number: 520882
    Gerrit-PatchSet: 1
    Gerrit-Owner: FMorschel <g...@fmorschel.dev>
    Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
    Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
    Gerrit-Attention: FMorschel <g...@fmorschel.dev>
    Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
    Gerrit-Comment-Date: Tue, 07 Jul 2026 18:27:10 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: FMorschel <g...@fmorschel.dev>
    Comment-In-Reply-To: Samuel Rawlins <sraw...@google.com>
    satisfied_requirement
    open
    diffy

    FMorschel (Gerrit)

    unread,
    Jul 7, 2026, 7:33:49 PM (8 days ago) Jul 7
    to Brian Wilkerson, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org
    Attention needed from Brian Wilkerson and Samuel Rawlins

    FMorschel voted and added 1 comment

    Votes added by FMorschel

    Auto-Submit+1

    1 comment

    File pkg/linter/lib/src/rules/unawaited_futures.dart
    Line 35, Patchset 1: // This rule does concern itself with `FutureOr`.
    Samuel Rawlins . resolved

    Dead comment?

    FMorschel

    I've copied this over from `discarded_futures`. Would you prefer I remove these from both?

    Brian Wilkerson

    I haven't looked at `discarded_futures`, but the point of the comment in this location was presumably to explain why the absence of handling for `FutureOr` wasn't considered a bug. It was impossible for a reader to know why it wasn't there without the comment. (Not that the comment really answered the question anyway.)

    Now that `FutureOr` is handled, the comment isn't helpful. A reader is unlikely to wonder "why is this handling FutureOr?" (nor would the revised comment answer that question if they did).

    Hence the request to delete the comment with this change.

    Your choice as to whether to delete it from `discarded_futures`.

    FMorschel

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Brian Wilkerson
    • Samuel Rawlins
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
    Gerrit-Change-Number: 520882
    Gerrit-PatchSet: 2
    Gerrit-Owner: FMorschel <g...@fmorschel.dev>
    Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
    Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
    Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
    Gerrit-Comment-Date: Tue, 07 Jul 2026 23:33:44 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Brian Wilkerson <brianwi...@google.com>
    unsatisfied_requirement
    open
    diffy

    Samuel Rawlins (Gerrit)

    unread,
    Jul 9, 2026, 12:25:45 AM (7 days ago) Jul 9
    to FMorschel, Brian Wilkerson, dart-analys...@google.com, rev...@dartlang.org
    Attention needed from Brian Wilkerson and FMorschel

    Samuel Rawlins voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Brian Wilkerson
    • FMorschel
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
    Gerrit-Change-Number: 520882
    Gerrit-PatchSet: 2
    Gerrit-Owner: FMorschel <g...@fmorschel.dev>
    Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
    Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
    Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Attention: FMorschel <g...@fmorschel.dev>
    Gerrit-Comment-Date: Thu, 09 Jul 2026 04:25:42 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Brian Wilkerson (Gerrit)

    unread,
    Jul 9, 2026, 10:35:37 AM (7 days ago) Jul 9
    to FMorschel, Brian Wilkerson, dart-...@luci-project-accounts.iam.gserviceaccount.com, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org
    Attention needed from FMorschel and Samuel Rawlins

    Brian Wilkerson voted and added 1 comment

    Votes added by Brian Wilkerson

    Code-Review+1

    1 comment

    Patchset-level comments
    File-level comment, Patchset 2 (Latest):
    Brian Wilkerson . resolved

    The lint is now reporting some cases that weren't reported before, in the analysis_server, flutter, and internal code. You can fix the first two, but someone else will need to fix the internal code.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • FMorschel
    • Samuel Rawlins
    Submit Requirements:
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: sdk
      Gerrit-Branch: main
      Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
      Gerrit-Change-Number: 520882
      Gerrit-PatchSet: 2
      Gerrit-Owner: FMorschel <g...@fmorschel.dev>
      Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
      Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
      Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
      Gerrit-Attention: FMorschel <g...@fmorschel.dev>
      Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
      Gerrit-Comment-Date: Thu, 09 Jul 2026 14:35:34 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      FMorschel (Gerrit)

      unread,
      Jul 9, 2026, 11:33:16 AM (7 days ago) Jul 9
      to Brian Wilkerson, dart-...@luci-project-accounts.iam.gserviceaccount.com, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org
      Attention needed from Samuel Rawlins

      FMorschel added 1 comment

      Patchset-level comments
      Brian Wilkerson . resolved

      The lint is now reporting some cases that weren't reported before, in the analysis_server, flutter, and internal code. You can fix the first two, but someone else will need to fix the internal code.

      FMorschel

      I'm aware. I'm working on the SDK changes, and I'll add a comment to the issue when I open the Flutter PR.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Samuel Rawlins
      Submit Requirements:
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: sdk
      Gerrit-Branch: main
      Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
      Gerrit-Change-Number: 520882
      Gerrit-PatchSet: 2
      Gerrit-Owner: FMorschel <g...@fmorschel.dev>
      Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
      Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
      Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
      Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
      Gerrit-Comment-Date: Thu, 09 Jul 2026 15:33:09 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Brian Wilkerson <brianwi...@google.com>
      satisfied_requirement
      open
      diffy

      Samuel Rawlins (Gerrit)

      unread,
      Jul 9, 2026, 11:33:34 AM (7 days ago) Jul 9
      to FMorschel, Brian Wilkerson, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org

      Samuel Rawlins added 1 comment

      File pkg/linter/test/rules/unawaited_futures_test.dart
      Line 262, Patchset 2 (Latest): [!g!]();
      Samuel Rawlins . unresolved

      Can we add a test like this that uses `unawaited`. I'm getting analyzer errors when I try this, highlighting the argument to `unawaited` saying:

      The argument type 'FutureOr<int>' can't be assigned to the parameter type 'Future<void>?'. #argument_type_not_assignable

      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: sdk
      Gerrit-Branch: main
      Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
      Gerrit-Change-Number: 520882
      Gerrit-PatchSet: 2
      Gerrit-Owner: FMorschel <g...@fmorschel.dev>
      Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
      Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
      Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
      Gerrit-Comment-Date: Thu, 09 Jul 2026 15:33:31 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      open
      diffy

      FMorschel (Gerrit)

      unread,
      Jul 9, 2026, 11:36:20 AM (7 days ago) Jul 9
      to Brian Wilkerson, dart-...@luci-project-accounts.iam.gserviceaccount.com, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org
      Attention needed from Samuel Rawlins

      FMorschel added 1 comment

      File pkg/linter/test/rules/unawaited_futures_test.dart
      Samuel Rawlins . unresolved

      Can we add a test like this that uses `unawaited`. I'm getting analyzer errors when I try this, highlighting the argument to `unawaited` saying:

      The argument type 'FutureOr<int>' can't be assigned to the parameter type 'Future<void>?'. #argument_type_not_assignable

      FMorschel

      I'm not sure I understand the request. It was defined at https://github.com/dart-lang/sdk/issues/59877 that we wouldn't accept `FutureOr` in `unawaited`. We need to use `//ignore` in that case.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Samuel Rawlins
      Submit Requirements:
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: sdk
      Gerrit-Branch: main
      Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
      Gerrit-Change-Number: 520882
      Gerrit-PatchSet: 2
      Gerrit-Owner: FMorschel <g...@fmorschel.dev>
      Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
      Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
      Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
      Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
      Gerrit-Comment-Date: Thu, 09 Jul 2026 15:36:17 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Samuel Rawlins <sraw...@google.com>
      satisfied_requirement
      open
      diffy

      Samuel Rawlins (Gerrit)

      unread,
      Jul 9, 2026, 11:42:40 AM (6 days ago) Jul 9
      to FMorschel, Brian Wilkerson, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
      Attention needed from FMorschel

      Samuel Rawlins added 3 comments

      File pkg/linter/messages.yaml
      Line 13744, Patchset 2 (Latest): correctionMessage: "Try adding an 'await' or wrapping the expression with 'unawaited'."
      Samuel Rawlins . unresolved

      We don't want to get too wordy here, but I think we should indicate that 'unawaited' won't work for FutureOr-typed expressions. Maybe just a parenthetical "(if it is a Future)".

      Line 13763, Patchset 2 (Latest): expression in a call to `unawaited()`.
      Samuel Rawlins . unresolved

      We need to mention here that this doesn't work with the FutureOr type (it probably won't help _too_ many users, but if a user tries to use unawaited, and gets stuck, and comes to the docs, this is a good place to help them).

      File pkg/linter/test/rules/unawaited_futures_test.dart
      Samuel Rawlins . unresolved

      Can we add a test like this that uses `unawaited`. I'm getting analyzer errors when I try this, highlighting the argument to `unawaited` saying:

      The argument type 'FutureOr<int>' can't be assigned to the parameter type 'Future<void>?'. #argument_type_not_assignable

      FMorschel

      I'm not sure I understand the request. It was defined at https://github.com/dart-lang/sdk/issues/59877 that we wouldn't accept `FutureOr` in `unawaited`. We need to use `//ignore` in that case.

      Samuel Rawlins

      Ah, I see. I think we should document this in one or two places. But I'll use `// ignore` to suppress.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • FMorschel
      Submit Requirements:
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: sdk
      Gerrit-Branch: main
      Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
      Gerrit-Change-Number: 520882
      Gerrit-PatchSet: 2
      Gerrit-Owner: FMorschel <g...@fmorschel.dev>
      Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
      Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
      Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
      Gerrit-Attention: FMorschel <g...@fmorschel.dev>
      Gerrit-Comment-Date: Thu, 09 Jul 2026 15:42:36 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      open
      diffy

      FMorschel (Gerrit)

      unread,
      Jul 9, 2026, 11:52:45 AM (6 days ago) Jul 9
      to Brian Wilkerson, dart-...@luci-project-accounts.iam.gserviceaccount.com, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org
      Attention needed from Brian Wilkerson and Samuel Rawlins

      FMorschel voted and added 3 comments

      Votes added by FMorschel

      Auto-Submit+1

      3 comments

      File pkg/linter/messages.yaml
      Line 13744, Patchset 2: correctionMessage: "Try adding an 'await' or wrapping the expression with 'unawaited'."
      Samuel Rawlins . resolved

      We don't want to get too wordy here, but I think we should indicate that 'unawaited' won't work for FutureOr-typed expressions. Maybe just a parenthetical "(if it is a Future)".

      FMorschel

      Done

      Line 13763, Patchset 2: expression in a call to `unawaited()`.
      Samuel Rawlins . resolved

      We need to mention here that this doesn't work with the FutureOr type (it probably won't help _too_ many users, but if a user tries to use unawaited, and gets stuck, and comes to the docs, this is a good place to help them).

      FMorschel

      Done

      File pkg/linter/test/rules/unawaited_futures_test.dart
      Line 262, Patchset 2: [!g!]();
      Samuel Rawlins . resolved

      Can we add a test like this that uses `unawaited`. I'm getting analyzer errors when I try this, highlighting the argument to `unawaited` saying:

      The argument type 'FutureOr<int>' can't be assigned to the parameter type 'Future<void>?'. #argument_type_not_assignable

      FMorschel

      I'm not sure I understand the request. It was defined at https://github.com/dart-lang/sdk/issues/59877 that we wouldn't accept `FutureOr` in `unawaited`. We need to use `//ignore` in that case.

      Samuel Rawlins

      Ah, I see. I think we should document this in one or two places. But I'll use `// ignore` to suppress.

      FMorschel

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Brian Wilkerson
      • Samuel Rawlins
      Submit Requirements:
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: sdk
      Gerrit-Branch: main
      Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
      Gerrit-Change-Number: 520882
      Gerrit-PatchSet: 2
      Gerrit-Owner: FMorschel <g...@fmorschel.dev>
      Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
      Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
      Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
      Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
      Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
      Gerrit-Comment-Date: Thu, 09 Jul 2026 15:52:43 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      unsatisfied_requirement
      open
      diffy

      FMorschel (Gerrit)

      unread,
      Jul 9, 2026, 12:02:20 PM (6 days ago) Jul 9
      to Brian Wilkerson, dart-...@luci-project-accounts.iam.gserviceaccount.com, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org
      Attention needed from Brian Wilkerson and Samuel Rawlins

      FMorschel voted and added 1 comment

      Votes added by FMorschel

      Auto-Submit+1

      1 comment

      Patchset-level comments
      Brian Wilkerson . resolved

      The lint is now reporting some cases that weren't reported before, in the analysis_server, flutter, and internal code. You can fix the first two, but someone else will need to fix the internal code.

      FMorschel

      I'm aware. I'm working on the SDK changes, and I'll add a comment to the issue when I open the Flutter PR.

      FMorschel

      I've commented on the issue too but the PR is https://github.com/flutter/flutter/pull/189198

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Brian Wilkerson
      • Samuel Rawlins
      Submit Requirements:
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: sdk
      Gerrit-Branch: main
      Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
      Gerrit-Change-Number: 520882
      Gerrit-PatchSet: 3
      Gerrit-Owner: FMorschel <g...@fmorschel.dev>
      Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
      Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
      Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
      Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
      Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
      Gerrit-Comment-Date: Thu, 09 Jul 2026 16:02:10 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      unsatisfied_requirement
      open
      diffy

      Samuel Rawlins (Gerrit)

      unread,
      Jul 9, 2026, 12:07:24 PM (6 days ago) Jul 9
      to FMorschel, Brian Wilkerson, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
      Attention needed from Brian Wilkerson and FMorschel

      Samuel Rawlins voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Brian Wilkerson
      • FMorschel
      Submit Requirements:
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: sdk
      Gerrit-Branch: main
      Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
      Gerrit-Change-Number: 520882
      Gerrit-PatchSet: 3
      Gerrit-Owner: FMorschel <g...@fmorschel.dev>
      Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
      Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
      Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
      Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
      Gerrit-Attention: FMorschel <g...@fmorschel.dev>
      Gerrit-Comment-Date: Thu, 09 Jul 2026 16:07:21 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Brian Wilkerson (Gerrit)

      unread,
      Jul 9, 2026, 12:27:04 PM (6 days ago) Jul 9
      to FMorschel, Brian Wilkerson, Samuel Rawlins, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
      Attention needed from FMorschel and Samuel Rawlins

      Brian Wilkerson voted and added 1 comment

      Votes added by Brian Wilkerson

      Code-Review+1

      1 comment

      File pkg/linter/messages.yaml
      Line 13744, Patchset 2: correctionMessage: "Try adding an 'await' or wrapping the expression with 'unawaited'."
      Samuel Rawlins . resolved

      We don't want to get too wordy here, but I think we should indicate that 'unawaited' won't work for FutureOr-typed expressions. Maybe just a parenthetical "(if it is a Future)".

      FMorschel

      Done

      Brian Wilkerson

      I'd rather have two codes (with a shared name) so that the suggestion only shows up when it's appropriate. That is, for a `FutureOr` the user would see

      Try adding an 'await'.

      And for a normal `Future` the user would see

      Try adding an 'await' or wrapping the expression with 'unawaited'.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • FMorschel
      • Samuel Rawlins
      Submit Requirements:
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: sdk
        Gerrit-Branch: main
        Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
        Gerrit-Change-Number: 520882
        Gerrit-PatchSet: 3
        Gerrit-Owner: FMorschel <g...@fmorschel.dev>
        Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
        Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
        Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
        Gerrit-Attention: FMorschel <g...@fmorschel.dev>
        Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
        Gerrit-Comment-Date: Thu, 09 Jul 2026 16:26:57 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        FMorschel (Gerrit)

        unread,
        Jul 9, 2026, 1:05:22 PM (6 days ago) Jul 9
        to Brian Wilkerson, Samuel Rawlins, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
        Attention needed from Brian Wilkerson and Samuel Rawlins

        FMorschel voted and added 1 comment

        Votes added by FMorschel

        Auto-Submit+1

        1 comment

        File pkg/linter/messages.yaml
        Line 13744, Patchset 2: correctionMessage: "Try adding an 'await' or wrapping the expression with 'unawaited'."
        Samuel Rawlins . resolved

        We don't want to get too wordy here, but I think we should indicate that 'unawaited' won't work for FutureOr-typed expressions. Maybe just a parenthetical "(if it is a Future)".

        FMorschel

        Done

        Brian Wilkerson

        I'd rather have two codes (with a shared name) so that the suggestion only shows up when it's appropriate. That is, for a `FutureOr` the user would see

        Try adding an 'await'.

        And for a normal `Future` the user would see

        Try adding an 'await' or wrapping the expression with 'unawaited'.

        FMorschel

        Even better! Done (x2)

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Brian Wilkerson
        • Samuel Rawlins
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: sdk
        Gerrit-Branch: main
        Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
        Gerrit-Change-Number: 520882
        Gerrit-PatchSet: 3
        Gerrit-Owner: FMorschel <g...@fmorschel.dev>
        Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
        Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
        Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
        Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
        Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
        Gerrit-Comment-Date: Thu, 09 Jul 2026 17:05:18 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Brian Wilkerson <brianwi...@google.com>
        unsatisfied_requirement
        open
        diffy

        Samuel Rawlins (Gerrit)

        unread,
        Jul 9, 2026, 1:08:22 PM (6 days ago) Jul 9
        to FMorschel, Brian Wilkerson, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
        Attention needed from Brian Wilkerson and FMorschel

        Samuel Rawlins voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Brian Wilkerson
        • FMorschel
        Submit Requirements:
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: sdk
        Gerrit-Branch: main
        Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
        Gerrit-Change-Number: 520882
        Gerrit-PatchSet: 4
        Gerrit-Owner: FMorschel <g...@fmorschel.dev>
        Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
        Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
        Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
        Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
        Gerrit-Attention: FMorschel <g...@fmorschel.dev>
        Gerrit-Comment-Date: Thu, 09 Jul 2026 17:08:18 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Brian Wilkerson (Gerrit)

        unread,
        Jul 9, 2026, 1:29:57 PM (6 days ago) Jul 9
        to FMorschel, Brian Wilkerson, Samuel Rawlins, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
        Attention needed from FMorschel

        Brian Wilkerson voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • FMorschel
        Submit Requirements:
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: sdk
          Gerrit-Branch: main
          Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
          Gerrit-Change-Number: 520882
          Gerrit-PatchSet: 4
          Gerrit-Owner: FMorschel <g...@fmorschel.dev>
          Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
          Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
          Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
          Gerrit-Attention: FMorschel <g...@fmorschel.dev>
          Gerrit-Comment-Date: Thu, 09 Jul 2026 17:29:53 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          FMorschel (Gerrit)

          unread,
          Jul 10, 2026, 7:14:12 AM (6 days ago) Jul 10
          to Brian Wilkerson, Samuel Rawlins, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
          Attention needed from Brian Wilkerson and Samuel Rawlins

          FMorschel voted and added 1 comment

          Votes added by FMorschel

          Auto-Submit+1

          1 comment

          Patchset-level comments
          Brian Wilkerson . resolved

          The lint is now reporting some cases that weren't reported before, in the analysis_server, flutter, and internal code. You can fix the first two, but someone else will need to fix the internal code.

          FMorschel

          I'm aware. I'm working on the SDK changes, and I'll add a comment to the issue when I open the Flutter PR.

          FMorschel

          I've commented on the issue too but the PR is https://github.com/flutter/flutter/pull/189198

          FMorschel

          The Flutter PR has landed. As soon as the internal code is fixed, this can land. Thanks!

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Brian Wilkerson
          • Samuel Rawlins
          Submit Requirements:
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: sdk
          Gerrit-Branch: main
          Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
          Gerrit-Change-Number: 520882
          Gerrit-PatchSet: 4
          Gerrit-Owner: FMorschel <g...@fmorschel.dev>
          Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
          Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
          Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
          Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
          Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
          Gerrit-Comment-Date: Fri, 10 Jul 2026 11:14:09 +0000
          satisfied_requirement
          open
          diffy

          FMorschel (Gerrit)

          unread,
          Jul 10, 2026, 11:45:42 AM (5 days ago) Jul 10
          to Samuel Rawlins, Brian Wilkerson, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
          Attention needed from Brian Wilkerson and Samuel Rawlins

          FMorschel voted and added 1 comment

          Votes added by FMorschel

          Auto-Submit+1

          1 comment

          Patchset-level comments
          File-level comment, Patchset 4:
          FMorschel . resolved

          Thanks for the bots, @sraw...@google.com! Everything is in order now. I wasn't aware each sub-diagnostic needed an entry in error_fix_status.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Brian Wilkerson
          • Samuel Rawlins
          Submit Requirements:
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: sdk
          Gerrit-Branch: main
          Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
          Gerrit-Change-Number: 520882
          Gerrit-PatchSet: 4
          Gerrit-Owner: FMorschel <g...@fmorschel.dev>
          Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
          Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
          Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
          Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
          Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
          Gerrit-Comment-Date: Fri, 10 Jul 2026 15:45:38 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          unsatisfied_requirement
          open
          diffy

          Samuel Rawlins (Gerrit)

          unread,
          Jul 10, 2026, 12:07:57 PM (5 days ago) Jul 10
          to FMorschel, Brian Wilkerson, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
          Attention needed from Brian Wilkerson and FMorschel

          Samuel Rawlins voted Code-Review+1

          Code-Review+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Brian Wilkerson
          • FMorschel
          Submit Requirements:
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: sdk
          Gerrit-Branch: main
          Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
          Gerrit-Change-Number: 520882
          Gerrit-PatchSet: 5
          Gerrit-Owner: FMorschel <g...@fmorschel.dev>
          Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
          Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
          Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
          Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
          Gerrit-Attention: FMorschel <g...@fmorschel.dev>
          Gerrit-Comment-Date: Fri, 10 Jul 2026 16:07:53 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          FMorschel (Gerrit)

          unread,
          Jul 10, 2026, 12:31:01 PM (5 days ago) Jul 10
          to Samuel Rawlins, Brian Wilkerson, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
          Attention needed from Brian Wilkerson and Samuel Rawlins

          FMorschel voted and added 1 comment

          Votes added by FMorschel

          Auto-Submit+1

          1 comment

          Patchset-level comments
          FMorschel . resolved

          Thanks for the bots, @sraw...@google.com! Everything is in order now. I wasn't aware each sub-diagnostic needed an entry in error_fix_status.

          FMorschel

          I don't think https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8676649034613111809/+/u/test_results/new_test_failures__logs_ has any relation to this change.

          If it does, can someone explain it to me?

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Brian Wilkerson
          • Samuel Rawlins
          Submit Requirements:
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: sdk
          Gerrit-Branch: main
          Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
          Gerrit-Change-Number: 520882
          Gerrit-PatchSet: 5
          Gerrit-Owner: FMorschel <g...@fmorschel.dev>
          Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
          Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
          Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
          Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
          Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
          Gerrit-Comment-Date: Fri, 10 Jul 2026 16:30:57 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Comment-In-Reply-To: FMorschel <g...@fmorschel.dev>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Brian Wilkerson (Gerrit)

          unread,
          Jul 10, 2026, 12:34:45 PM (5 days ago) Jul 10
          to FMorschel, Brian Wilkerson, Samuel Rawlins, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
          Attention needed from FMorschel and Samuel Rawlins

          Brian Wilkerson voted and added 1 comment

          Votes added by Brian Wilkerson

          Code-Review+1

          1 comment

          Patchset-level comments
          FMorschel . resolved

          Thanks for the bots, @sraw...@google.com! Everything is in order now. I wasn't aware each sub-diagnostic needed an entry in error_fix_status.

          FMorschel

          I don't think https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8676649034613111809/+/u/test_results/new_test_failures__logs_ has any relation to this change.

          If it does, can someone explain it to me?

          Brian Wilkerson

          I don't see how it could be related. It isn't failing on the non-`try` bot, so I'll try re-running it.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • FMorschel
          • Samuel Rawlins
          Submit Requirements:
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: sdk
            Gerrit-Branch: main
            Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
            Gerrit-Change-Number: 520882
            Gerrit-PatchSet: 5
            Gerrit-Owner: FMorschel <g...@fmorschel.dev>
            Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
            Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
            Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
            Gerrit-Attention: FMorschel <g...@fmorschel.dev>
            Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
            Gerrit-Comment-Date: Fri, 10 Jul 2026 16:34:40 +0000
            satisfied_requirement
            open
            diffy

            Samuel Rawlins (Gerrit)

            unread,
            Jul 10, 2026, 1:05:06 PM (5 days ago) Jul 10
            to FMorschel, Brian Wilkerson, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
            Attention needed from FMorschel

            Samuel Rawlins voted Commit-Queue+2

            Commit-Queue+2
            Open in Gerrit

            Related details

            Attention is currently required from:
            • FMorschel
            Submit Requirements:
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: sdk
            Gerrit-Branch: main
            Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
            Gerrit-Change-Number: 520882
            Gerrit-PatchSet: 5
            Gerrit-Owner: FMorschel <g...@fmorschel.dev>
            Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
            Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
            Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
            Gerrit-Attention: FMorschel <g...@fmorschel.dev>
            Gerrit-Comment-Date: Fri, 10 Jul 2026 17:05:02 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            open
            diffy

            dart-scoped@luci-project-accounts.iam.gserviceaccount.com (Gerrit)

            unread,
            Jul 10, 2026, 1:05:17 PM (5 days ago) Jul 10
            to FMorschel, Brian Wilkerson, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org

            dart-...@luci-project-accounts.iam.gserviceaccount.com submitted the change

            Change information

            Commit message:
            [linter] Makes `unawaited_futures` report for `FutureOr`
            Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
            Commit-Queue: Samuel Rawlins <sraw...@google.com>
            Auto-Submit: FMorschel <g...@fmorschel.dev>
            Reviewed-by: Brian Wilkerson <brianwi...@google.com>
            Reviewed-by: Samuel Rawlins <sraw...@google.com>
            Files:
            • M pkg/analysis_server/lib/src/lsp/handlers/commands/fix_all_in_workspace.dart
            • M pkg/analysis_server/lib/src/lsp/handlers/commands/perform_refactor.dart
            • M pkg/analysis_server/lib/src/lsp/handlers/commands/refactor_command_executor.dart
            • M pkg/analysis_server/lib/src/lsp/handlers/commands/validate_refactor.dart
            • M pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
            • M pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
            • M pkg/analysis_server/lib/src/services/correction/fix_internal.dart
            • M pkg/analysis_server/test/shared/shared_workspace_apply_edit_tests.dart
            • M pkg/analysis_server/test/src/services/correction/fix/add_async_test.dart
            • M pkg/analysis_server/test/src/services/correction/fix/add_await_test.dart
            • M pkg/analysis_server/test/src/services/correction/fix/wrap_in_unawaited_test.dart
            • M pkg/linter/lib/src/diagnostic.g.dart
            • M pkg/linter/lib/src/rules/discarded_futures.dart
            • M pkg/linter/lib/src/rules/unawaited_futures.dart
            • M pkg/linter/lib/src/util/unused_futures.dart
            • M pkg/linter/messages.yaml
            • M pkg/linter/test/rules/unawaited_futures_test.dart
            Change size: L
            Delta: 17 files changed, 178 insertions(+), 76 deletions(-)
            Branch: refs/heads/main
            Submit Requirements:
            • requirement satisfiedCode-Review: +1 by Samuel Rawlins, +1 by Brian Wilkerson
            Open in Gerrit
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: merged
            Gerrit-Project: sdk
            Gerrit-Branch: main
            Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
            Gerrit-Change-Number: 520882
            Gerrit-PatchSet: 6
            Gerrit-Owner: FMorschel <g...@fmorschel.dev>
            Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
            Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
            Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
            open
            diffy
            satisfied_requirement

            Graciliano M P (Gerrit)

            unread,
            Jul 10, 2026, 4:32:45 PM (5 days ago) Jul 10
            to FMorschel, dart-...@luci-project-accounts.iam.gserviceaccount.com, Brian Wilkerson, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org

            Graciliano M P added 1 comment

            Patchset-level comments
            File-level comment, Patchset 6 (Latest):
            Graciliano M P . resolved

            Just a question:

            Would this case trigger a warning?

            ```dart
            FutureOr<int> maybeAsync(bool sync) {
            return sync ? 123 : Future.value(456);
            }
            Future<int> alwaysAsync1(bool sync) {
            print("Calling maybeAsync($sync)...");
            return maybeAsync(sync);
            }
            Future<int> alwaysAsync2(bool sync) async {
            print("Calling maybeAsync($sync)...");
            return maybeAsync(sync);
            }
            ```

            I think neither of these cases should trigger a warning.

            Open in Gerrit

            Related details

            Attention set is empty
            Submit Requirements:
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: sdk
            Gerrit-Branch: main
            Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
            Gerrit-Change-Number: 520882
            Gerrit-PatchSet: 6
            Gerrit-Owner: FMorschel <g...@fmorschel.dev>
            Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
            Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
            Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
            Gerrit-CC: Graciliano M P <gracil...@gmail.com>
            Gerrit-Comment-Date: Fri, 10 Jul 2026 20:32:38 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            open
            diffy

            FMorschel (Gerrit)

            unread,
            Jul 10, 2026, 4:36:04 PM (5 days ago) Jul 10
            to dart-...@luci-project-accounts.iam.gserviceaccount.com, Graciliano M P, Brian Wilkerson, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org

            FMorschel added 1 comment

            Patchset-level comments
            Graciliano M P . resolved

            Just a question:

            Would this case trigger a warning?

            ```dart
            FutureOr<int> maybeAsync(bool sync) {
            return sync ? 123 : Future.value(456);
            }
            Future<int> alwaysAsync1(bool sync) {
            print("Calling maybeAsync($sync)...");
            return maybeAsync(sync);
            }
            Future<int> alwaysAsync2(bool sync) async {
            print("Calling maybeAsync($sync)...");
            return maybeAsync(sync);
            }
            ```

            I think neither of these cases should trigger a warning.

            FMorschel

            Only the `Future` inside `maybeAsync` if you enable `discarded_futures`. The other cases won't trigger either `discarded_futures` or `unawaited_futures` because you are "using" the value (with the `return`).

            Open in Gerrit

            Related details

            Attention set is empty
            Submit Requirements:
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: sdk
            Gerrit-Branch: main
            Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
            Gerrit-Change-Number: 520882
            Gerrit-PatchSet: 6
            Gerrit-Owner: FMorschel <g...@fmorschel.dev>
            Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
            Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
            Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
            Gerrit-CC: Graciliano M P <gracil...@gmail.com>
            Gerrit-Comment-Date: Fri, 10 Jul 2026 20:36:00 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Graciliano M P <gracil...@gmail.com>
            satisfied_requirement
            open
            diffy

            Graciliano M P (Gerrit)

            unread,
            Jul 10, 2026, 4:40:51 PM (5 days ago) Jul 10
            to FMorschel, dart-...@luci-project-accounts.iam.gserviceaccount.com, Brian Wilkerson, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org

            Graciliano M P added 1 comment

            Patchset-level comments
            Graciliano M P . resolved

            Just a question:

            Would this case trigger a warning?

            ```dart
            FutureOr<int> maybeAsync(bool sync) {
            return sync ? 123 : Future.value(456);
            }
            Future<int> alwaysAsync1(bool sync) {
            print("Calling maybeAsync($sync)...");
            return maybeAsync(sync);
            }
            Future<int> alwaysAsync2(bool sync) async {
            print("Calling maybeAsync($sync)...");
            return maybeAsync(sync);
            }
            ```

            I think neither of these cases should trigger a warning.

            Graciliano M P

            Additionally, I don't think this case should trigger a warning either:

            ```dart
            FutureOr<int> alwaysAsync3(bool sync) {

            print("Calling maybeAsync($sync)...");
            return maybeAsync(sync);
            }
            FutureOr<int> alwaysAsync4(bool sync) async {

            print("Calling maybeAsync($sync)...");
            return maybeAsync(sync);
            }
            ```

            ---

            Note that here the `Future` is being returned directly, which is equivalent to the original code:

            ```dart
            FutureOr<int> maybeAsync(bool sync) {
              if (sync) {
            return 123;
            } else {
            return Future<int>.value(456);
            }
            }
            ```
            Open in Gerrit

            Related details

            Attention set is empty
            Submit Requirements:
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: sdk
            Gerrit-Branch: main
            Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
            Gerrit-Change-Number: 520882
            Gerrit-PatchSet: 6
            Gerrit-Owner: FMorschel <g...@fmorschel.dev>
            Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
            Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
            Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
            Gerrit-CC: Graciliano M P <gracil...@gmail.com>
            Gerrit-Comment-Date: Fri, 10 Jul 2026 20:40:46 +0000
            satisfied_requirement
            open
            diffy

            FMorschel (Gerrit)

            unread,
            Jul 10, 2026, 4:46:18 PM (5 days ago) Jul 10
            to dart-...@luci-project-accounts.iam.gserviceaccount.com, Graciliano M P, Brian Wilkerson, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org

            FMorschel added 1 comment

            Patchset-level comments
            FMorschel

            All still fine cases, no report will happen. This change is meant to help you with:

            ```dart
            void main() async {
            futureOrFunc(); //Nothing previously but now we get a lint
            futureFunc(); //Linted
            }
            Future<void> futureFunc() async {
            // Expects something of `futureOrFunc` to be done
            }

            FutureOr<void> futureOrFunc() async {}
            ```

            Open in Gerrit

            Related details

            Attention set is empty
            Submit Requirements:
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: sdk
            Gerrit-Branch: main
            Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
            Gerrit-Change-Number: 520882
            Gerrit-PatchSet: 6
            Gerrit-Owner: FMorschel <g...@fmorschel.dev>
            Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
            Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
            Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
            Gerrit-CC: Graciliano M P <gracil...@gmail.com>
            Gerrit-Comment-Date: Fri, 10 Jul 2026 20:46:14 +0000
            satisfied_requirement
            open
            diffy

            Graciliano M P (Gerrit)

            unread,
            Jul 11, 2026, 7:00:35 PM (4 days ago) Jul 11
            to FMorschel, dart-...@luci-project-accounts.iam.gserviceaccount.com, Brian Wilkerson, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org

            Graciliano M P added 1 comment

            Patchset-level comments
            Graciliano M P

            I'm the author of `async_extension`: https://github.com/eneural-net/async_extension

            I'm exploring use cases where a new lint warning might be beneficial or potentially problematic.

            I'm generally in favor of applying `unawaited_futures` to `FutureOr` values, but only in cases where it helps identify a genuinely missing `await`.

            Open in Gerrit

            Related details

            Attention set is empty
            Submit Requirements:
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: sdk
            Gerrit-Branch: main
            Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
            Gerrit-Change-Number: 520882
            Gerrit-PatchSet: 6
            Gerrit-Owner: FMorschel <g...@fmorschel.dev>
            Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
            Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
            Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
            Gerrit-CC: Graciliano M P <gracil...@gmail.com>
            Gerrit-Comment-Date: Sat, 11 Jul 2026 23:00:31 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: FMorschel <g...@fmorschel.dev>
            satisfied_requirement
            open
            diffy

            FMorschel (Gerrit)

            unread,
            Jul 11, 2026, 7:05:50 PM (4 days ago) Jul 11
            to dart-...@luci-project-accounts.iam.gserviceaccount.com, Graciliano M P, Brian Wilkerson, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org

            FMorschel added 1 comment

            Patchset-level comments
            FMorschel

            This change makes nothing but trigger the same cases we have for `Future` but for `FutureOr`, so it should be fine.

            You might be interested in the _actually new_ lint and warning diagnostics `async_return_with_no_await` and `unawaited_return_in_try_block`:

            Open in Gerrit

            Related details

            Attention set is empty
            Submit Requirements:
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: sdk
            Gerrit-Branch: main
            Gerrit-Change-Id: I8fcfd5efc2ff6b29cb9cf94353f8e11ea02c8864
            Gerrit-Change-Number: 520882
            Gerrit-PatchSet: 6
            Gerrit-Owner: FMorschel <g...@fmorschel.dev>
            Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
            Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
            Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
            Gerrit-CC: Graciliano M P <gracil...@gmail.com>
            Gerrit-Comment-Date: Sat, 11 Jul 2026 23:05:46 +0000
            satisfied_requirement
            open
            diffy

            Liam Appelbe (Gerrit)

            unread,
            7:18 PM (4 hours ago) 7:18 PM
            to FMorschel, dart-...@luci-project-accounts.iam.gserviceaccount.com, Graciliano M P, Brian Wilkerson, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org, Liam Appelbe

            Liam Appelbe has created a revert of this change

            Related details

            Attention set is empty
            Submit Requirements:
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: revert
            satisfied_requirement
            open
            diffy
            Reply all
            Reply to author
            Forward
            0 new messages