[M] Change in dart/sdk[main]: [DAS] Fixes values suggestion without enum name

0 views
Skip to first unread message

Felipe Morschel (Gerrit)

unread,
Aug 8, 2025, 10:08:00 AM8/8/25
to dart-analys...@google.com, rev...@dartlang.org

Felipe Morschel has uploaded the change for review

Commit message

[DAS] Fixes values suggestion without enum name
Change-Id: I6938d0ce60aaf50e71e4f1df644217f0344a89d6

Change information

Files:
  • M pkg/analysis_server/lib/src/services/completion/dart/declaration_helper.dart
  • M pkg/analysis_server/test/lsp/completion_dart_test.dart
  • M pkg/analysis_server/test/services/completion/dart/location/dot_shorthand_property_access_test.dart
  • M pkg/analysis_server/test/services/completion/dart/location/enum_declaration_test.dart
Change size: M
Delta: 4 files changed, 68 insertions(+), 1 deletion(-)
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: I6938d0ce60aaf50e71e4f1df644217f0344a89d6
Gerrit-Change-Number: 444441
Gerrit-PatchSet: 1
Gerrit-Owner: Felipe Morschel <g...@fmorschel.dev>
Gerrit-Reviewer: Felipe Morschel <g...@fmorschel.dev>
unsatisfied_requirement
open
diffy

Felipe Morschel (Gerrit)

unread,
Aug 8, 2025, 10:10:53 AM8/8/25
to Brian Wilkerson, Samuel Rawlins, Danny Tuppeny, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Brian Wilkerson, Danny Tuppeny and Samuel Rawlins

Felipe Morschel added 1 comment

File pkg/analysis_server/test/lsp/completion_dart_test.dart
Line 108, Patchset 1 (Latest): Future<void> assertNoCompletionItem(String label) async {
Felipe Morschel . unresolved

WDYT about this method @da...@tuppeny.com? I couldn't find anything similar but maybe I missed something.

Open in Gerrit

Related details

Attention is currently required from:
  • Brian Wilkerson
  • Danny Tuppeny
  • 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: I6938d0ce60aaf50e71e4f1df644217f0344a89d6
Gerrit-Change-Number: 444441
Gerrit-PatchSet: 1
Gerrit-Owner: Felipe Morschel <g...@fmorschel.dev>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Felipe Morschel <g...@fmorschel.dev>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
Gerrit-Comment-Date: Fri, 08 Aug 2025 14:10:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Samuel Rawlins (Gerrit)

unread,
Aug 24, 2025, 11:46:34 PM8/24/25
to Felipe Morschel, Brian Wilkerson, Danny Tuppeny, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Brian Wilkerson, Danny Tuppeny and Felipe Morschel

Samuel Rawlins voted and added 1 comment

Votes added by Samuel Rawlins

Code-Review+1

1 comment

File pkg/analysis_server/lib/src/services/completion/dart/declaration_helper.dart
Line 2761, Patchset 2 (Latest): if (name == 'values' &&
Samuel Rawlins . unresolved

This could just be `return name == ...`.

Open in Gerrit

Related details

Attention is currently required from:
  • Brian Wilkerson
  • Danny Tuppeny
  • Felipe Morschel
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: I6938d0ce60aaf50e71e4f1df644217f0344a89d6
Gerrit-Change-Number: 444441
Gerrit-PatchSet: 2
Gerrit-Owner: Felipe Morschel <g...@fmorschel.dev>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Felipe Morschel <g...@fmorschel.dev>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Attention: Felipe Morschel <g...@fmorschel.dev>
Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
Gerrit-Comment-Date: Mon, 25 Aug 2025 03:46:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Felipe Morschel (Gerrit)

unread,
Aug 26, 2025, 12:18:59 AM8/26/25
to Commit Queue, Samuel Rawlins, Brian Wilkerson, Danny Tuppeny, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Brian Wilkerson, Danny Tuppeny and Samuel Rawlins

Felipe Morschel voted and added 1 comment

Votes added by Felipe Morschel

Auto-Submit+1

1 comment

File pkg/analysis_server/lib/src/services/completion/dart/declaration_helper.dart
Line 2761, Patchset 2: if (name == 'values' &&
Samuel Rawlins . resolved

This could just be `return name == ...`.

Felipe Morschel

Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Brian Wilkerson
  • Danny Tuppeny
  • 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: I6938d0ce60aaf50e71e4f1df644217f0344a89d6
Gerrit-Change-Number: 444441
Gerrit-PatchSet: 2
Gerrit-Owner: Felipe Morschel <g...@fmorschel.dev>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Felipe Morschel <g...@fmorschel.dev>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
Gerrit-Comment-Date: Tue, 26 Aug 2025 04:18:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Samuel Rawlins <sraw...@google.com>
unsatisfied_requirement
open
diffy

Danny Tuppeny (Gerrit)

unread,
Aug 26, 2025, 4:38:25 AM8/26/25
to Felipe Morschel, Commit Queue, Samuel Rawlins, Brian Wilkerson, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Brian Wilkerson, Felipe Morschel and Samuel Rawlins

Danny Tuppeny added 1 comment

File pkg/analysis_server/test/lsp/completion_dart_test.dart
Line 108, Patchset 1: Future<void> assertNoCompletionItem(String label) async {
Felipe Morschel . resolved

WDYT about this method @da...@tuppeny.com? I couldn't find anything similar but maybe I missed something.

Danny Tuppeny

Looks fair to me, although I think the failure message might be slightly better if you did something like:

```
expect(completions.where((c) => c.label == label), isEmpty);
```

Because I think your current code would fail with "Expected true, got false" whereas using `isEmpty` I think would give something like "Expected empty, but got <toString version of the results>". If the completion items have useful toStrings() (not a guarantee), this might be a slightly more useful message.

Open in Gerrit

Related details

Attention is currently required from:
  • Brian Wilkerson
  • Felipe Morschel
  • 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: I6938d0ce60aaf50e71e4f1df644217f0344a89d6
Gerrit-Change-Number: 444441
Gerrit-PatchSet: 4
Gerrit-Owner: Felipe Morschel <g...@fmorschel.dev>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Felipe Morschel <g...@fmorschel.dev>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Attention: Felipe Morschel <g...@fmorschel.dev>
Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
Gerrit-Comment-Date: Tue, 26 Aug 2025 08:38:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Felipe Morschel <g...@fmorschel.dev>
unsatisfied_requirement
open
diffy

Brian Wilkerson (Gerrit)

unread,
Aug 28, 2025, 1:17:10 PM8/28/25
to Felipe Morschel, Brian Wilkerson, Commit Queue, Samuel Rawlins, Danny Tuppeny, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Felipe Morschel and Samuel Rawlins

Brian Wilkerson voted

Code-Review+1
Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Felipe Morschel
  • 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: I6938d0ce60aaf50e71e4f1df644217f0344a89d6
Gerrit-Change-Number: 444441
Gerrit-PatchSet: 5
Gerrit-Owner: Felipe Morschel <g...@fmorschel.dev>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Felipe Morschel <g...@fmorschel.dev>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Attention: Felipe Morschel <g...@fmorschel.dev>
Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
Gerrit-Comment-Date: Thu, 28 Aug 2025 17:17:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Felipe Morschel (Gerrit)

unread,
Aug 28, 2025, 1:40:11 PM8/28/25
to Brian Wilkerson, Commit Queue, Samuel Rawlins, Danny Tuppeny, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Samuel Rawlins

Felipe Morschel voted and added 1 comment

Votes added by Felipe Morschel

Auto-Submit+1

1 comment

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Felipe Morschel . unresolved

Friendly ping @sraw...@google.com. Could you please give me a new review here? Thanks a lot!

Open in Gerrit

Related details

Attention is currently required from:
  • 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: I6938d0ce60aaf50e71e4f1df644217f0344a89d6
Gerrit-Change-Number: 444441
Gerrit-PatchSet: 5
Gerrit-Owner: Felipe Morschel <g...@fmorschel.dev>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Felipe Morschel <g...@fmorschel.dev>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
Gerrit-Comment-Date: Thu, 28 Aug 2025 17:40:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Samuel Rawlins (Gerrit)

unread,
Aug 28, 2025, 8:30:15 PM8/28/25
to Felipe Morschel, Brian Wilkerson, Commit Queue, Danny Tuppeny, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Felipe Morschel

Samuel Rawlins voted and added 1 comment

Votes added by Samuel Rawlins

Code-Review+1
Commit-Queue+2

1 comment

Patchset-level comments
Felipe Morschel . resolved

Friendly ping @sraw...@google.com. Could you please give me a new review here? Thanks a lot!

Samuel Rawlins

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Felipe Morschel
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: I6938d0ce60aaf50e71e4f1df644217f0344a89d6
    Gerrit-Change-Number: 444441
    Gerrit-PatchSet: 5
    Gerrit-Owner: Felipe Morschel <g...@fmorschel.dev>
    Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Reviewer: Felipe Morschel <g...@fmorschel.dev>
    Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
    Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
    Gerrit-Attention: Felipe Morschel <g...@fmorschel.dev>
    Gerrit-Comment-Date: Fri, 29 Aug 2025 00:30:12 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Felipe Morschel <g...@fmorschel.dev>
    satisfied_requirement
    open
    diffy

    Commit Queue (Gerrit)

    unread,
    Aug 28, 2025, 8:30:36 PM8/28/25
    to Felipe Morschel, Samuel Rawlins, Brian Wilkerson, Danny Tuppeny, dart-analys...@google.com, rev...@dartlang.org

    Commit Queue submitted the change

    Change information

    Commit message:
    [DAS] Fixes values suggestion without enum name
    Change-Id: I6938d0ce60aaf50e71e4f1df644217f0344a89d6
    Commit-Queue: Samuel Rawlins <sraw...@google.com>
    Reviewed-by: Samuel Rawlins <sraw...@google.com>
    Reviewed-by: Brian Wilkerson <brianwi...@google.com>
    Auto-Submit: Felipe Morschel <g...@fmorschel.dev>
    Files:
    • M pkg/analysis_server/lib/src/services/completion/dart/declaration_helper.dart
    • M pkg/analysis_server/test/lsp/completion_dart_test.dart
    • M pkg/analysis_server/test/services/completion/dart/declaration/enum_test.dart
    • M pkg/analysis_server/test/services/completion/dart/location/dot_shorthand_property_access_test.dart
    • M pkg/analysis_server/test/services/completion/dart/location/enum_declaration_test.dart
    Change size: M
    Delta: 5 files changed, 111 insertions(+), 2 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: I6938d0ce60aaf50e71e4f1df644217f0344a89d6
    Gerrit-Change-Number: 444441
    Gerrit-PatchSet: 6
    Gerrit-Owner: Felipe Morschel <g...@fmorschel.dev>
    Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Reviewer: Felipe Morschel <g...@fmorschel.dev>
    Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
    Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages