Skip to content

Dragging multiple files/folders are once does not update import statements #4533

Closed

Description

@lukehutch

Describe the bug

If I drag a dart file from one folder to another in VSCode with Dart-Code, the imports of other dart files that depend upon that file are not updated (i.e. the imports end up broken).

Expected behavior

Import paths should be updated when files are moved.

Please complete the following information:

  • Operating System and version: Linux
  • VS Code version: code-1.78.0-1683145689.el7.x86_64
  • Dart extension version: Latest
  • Dart/Flutter SDK version: Dart SDK version: 2.19.4 (stable) (Tue Mar 7 09:58:46 2023 +0000) on "linux_x64"
  • Target device (if the issue relates to Flutter debugging):

Activity

  1. lukehutch commented on May 9, 2023

    @lukehutch
    Author

    Correction: sometimes imports are updated, sometimes they are not. I haven't figured out under which circumstances the imports are not updated.

  2. DanTup commented on May 10, 2023

    @DanTup
    Member

    @lukehutch is it when you're dragging multiple items at once? Currently we only support moving a single "item" at a time.

  3. added
    awaiting infoRequires more information from the customer to progress
    on May 10, 2023
  4. lukehutch commented on May 10, 2023

    @lukehutch
    Author

    Yes, it was while moving multiple items. I couldn't reproduce it later because I was moving a single item at a time.

  5. DanTup commented on May 15, 2023

    @DanTup
    Member

    Thanks for confirming. This is a known limitation of the rename. I thought there was an issue already open tracking this but I can't find one (here or in the SDK) so I'll keep this open for that. Unfortunately it's not a trivial fix.

  6. added this to the On Deck milestone on May 15, 2023
  7. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    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 May 15, 2023
  8. changed the title [-]Dragging a dart file into another folder does not update dependent imports[/-] [+]Dragging multiple files/folders are once does not update import statements[/+] on May 15, 2023
  9. DanTup commented on Nov 27, 2023

    @DanTup
    Member

    This is fixed by dart-lang/sdk@09f3eb0 and will ship in a future SDK 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 enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions