Skip to content

Closure completions are not showing up in VS Code #4837

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DanTup opened this issue Nov 14, 2023 · 5 comments
Closed

Closure completions are not showing up in VS Code #4837

DanTup opened this issue Nov 14, 2023 · 5 comments
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is bug relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available
Milestone

Comments

@DanTup
Copy link
Member

DanTup commented Nov 14, 2023

While looking into #4834, I don't see any closure completions even using code from the test:

image

@DanTup DanTup added is bug in editor Relates to code editing or language features labels Nov 14, 2023
@DanTup DanTup added this to the v3.78.0 milestone Nov 14, 2023
@DanTup
Copy link
Member Author

DanTup commented Nov 14, 2023

From the log... labels are missing:

{
	"insertTextFormat": 2,
	"kind": 2,
	"label": "",
	"sortText": "9099",
	"textEditText": "(a, b) {\n      $0\n    },"
},
{
	"insertTextFormat": 2,
	"kind": 2,
	"label": "",
	"sortText": "9099",
	"textEditText": "(a, b) => $0,"
},

Something is likely going wrong with the mapping - this also suggests we have no LSP tests for closures.

@DanTup DanTup added the in lsp/analysis server Something to be fixed in the Dart analysis server label Nov 14, 2023
@DanTup
Copy link
Member Author

DanTup commented Nov 14, 2023

@DanTup DanTup added the relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available label Nov 14, 2023
@DanTup DanTup changed the title Closure completions are not showing up in VS Code Closure completions are not showing up in VS Code in bleeding-edge SDKs Nov 14, 2023
copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Nov 14, 2023
Closure completions disappeared in eb73dba because we ended up wiping our the filterText/label when trying to clean them up for functions.

Fixes Dart-Code/Dart-Code#4837

Change-Id: I61976734356117aa1ec0fae81c8a56245f2b35c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335822
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
@DanTup
Copy link
Member Author

DanTup commented Nov 15, 2023

Fixed by dart-lang/sdk@28d9ac0

@DanTup DanTup closed this as completed Nov 15, 2023
@DanTup DanTup changed the title Closure completions are not showing up in VS Code in bleeding-edge SDKs Closure completions are not showing up in VS Code Nov 20, 2023
@DanTup
Copy link
Member Author

DanTup commented Nov 20, 2023

This came up in #4845 too.

@bwilkerson @jacob314 FYI - when I fixed this last week I thought the bug had only made bleeding-edge SDKs, but apparently I got the branch date wrong and the bug shipped in stable.

I don't know if it meets the bar for a cherry-pick, but it might may come up a lot given how common function parameters are in Flutter. The actual fix is pretty trivial (see dart-lang/sdk@28d9ac0).

@DanTup
Copy link
Member Author

DanTup commented Nov 25, 2023

Since this issue is being raised a lot, here's a summary that I can link to from other issues I'm closing as a dupe.

Edit: 2023-12-01: This bug was in the Dart 3.2 / Flutter 3.16 SDK releases and a fix has been hot-fixed into Dart 3.2.2 / Flutter 3.16.2.

If you're still seeing this, please update to the latest Dart/Flutter and restart VS Code.

copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Nov 28, 2023
Closure completions disappeared in eb73dba because we ended up wiping our the filterText/label when trying to clean them up for functions.

Fixes Dart-Code/Dart-Code#4837

Bug: Dart-Code/Dart-Code#4837
Change-Id: I536ce38624ee3f6047229ac58c3fe173d162079a
Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/335822
Cherry-pick-request: #54112
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337341
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
@DanTup DanTup unpinned this issue Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is bug relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available
Projects
None yet
Development

No branches or pull requests

1 participant