Skip to content
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

Autocomplete is triggered while writing a comment #3783

Closed
osaxma opened this issue Jan 15, 2022 · 4 comments
Closed

Autocomplete is triggered while writing a comment #3783

osaxma opened this issue Jan 15, 2022 · 4 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
Milestone

Comments

@osaxma
Copy link

osaxma commented Jan 15, 2022

Describe the bug

Screen.Recording.2022-01-15.at.9.36.40.PM.mov

To Reproduce
I tried to isolate the issue in a separate file but I couldn't reproduce it even using the same set of imports. It's happening only in the file where the recording was taken.

Expected behavior
Autocomplete shouldn't be triggered when typing within a comment.

Versions:

  • VS Code version: 1.63.2
  • Dart extension version: 3.32.0
  • Dart/Flutter SDK version:
Flutter 2.8.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 77d935af4d (4 weeks ago) • 2021-12-16 08:37:33 -0800
Engine • revision 890a5fca2e
Tools • Dart 2.15.1
@osaxma osaxma added the is bug label Jan 15, 2022
@DanTup
Copy link
Member

DanTup commented Jan 17, 2022

Is there any more content after the comment shown here? Any other differences you can see (line endings, trailing newlines, etc.?)

There is code that's supposed to prevent completion in comments, although there have been some edge cases with how comments at the end of the file are represented in the AST before.

If you make an exact copy of this file (not the content, but the file on disk) in a new project, does it occur there?

@DanTup DanTup added the awaiting info Requires more information from the customer to progress label Jan 17, 2022
@osaxma
Copy link
Author

osaxma commented Jan 17, 2022

This should reproduce in a new empty file:

// <type here>

/// some doc comments
class SomeClass {}

I guess because the comment is followed by a documentation comment (if removed, no issue).

@DanTup DanTup added in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server and removed awaiting info Requires more information from the customer to progress labels Jan 17, 2022
@DanTup DanTup added this to the v3.34.0 milestone Jan 17, 2022
@DanTup
Copy link
Member

DanTup commented Jan 17, 2022

I can repro, thanks!

copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Jan 19, 2022
Fixes Dart-Code/Dart-Code#3783.

Change-Id: I8539d8b525534ad85b42618a6a3e9888fb43c851
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
@DanTup
Copy link
Member

DanTup commented Jan 19, 2022

Fixed by dart-lang/sdk@5455047. It's an SDK change so will show up in a future SDK release rather than a Dart-Code release.

@DanTup DanTup closed this as completed Jan 19, 2022
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
Projects
None yet
Development

No branches or pull requests

2 participants