Skip to content

Autocomplete is triggered while writing a comment #3783

Closed

Description

@osaxma

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

Activity

  1. DanTup commented on Jan 17, 2022

    @DanTup
    Member

    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?

  2. added
    awaiting infoRequires more information from the customer to progress
    on Jan 17, 2022
  3. osaxma commented on Jan 17, 2022

    @osaxma
    Author

    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).

  4. added
    in editorRelates to code editing or language features
    in lsp/analysis serverSomething to be fixed in the Dart analysis server
    and removed
    awaiting infoRequires more information from the customer to progress
    on Jan 17, 2022
  5. added this to the v3.34.0 milestone on Jan 17, 2022
  6. DanTup commented on Jan 17, 2022

    @DanTup
    Member

    I can repro, thanks!

  7. DanTup commented on Jan 19, 2022

    @DanTup
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serveris bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions