You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dragging multiple files/folders are once does not update import statements #4533
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):
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.
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
Activity
lukehutch commentedon May 9, 2023
Correction: sometimes imports are updated, sometimes they are not. I haven't figured out under which circumstances the imports are not updated.
DanTup commentedon May 10, 2023
@lukehutch is it when you're dragging multiple items at once? Currently we only support moving a single "item" at a time.
lukehutch commentedon May 10, 2023
Yes, it was while moving multiple items. I couldn't reproduce it later because I was moving a single item at a time.
DanTup commentedon May 15, 2023
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.
[-]Dragging a dart file into another folder does not update dependent imports[/-][+]Dragging multiple files/folders are once does not update import statements[/+][analysis_server] Support renaming multiple files in a single operation
DanTup commentedon Nov 27, 2023
This is fixed by dart-lang/sdk@09f3eb0 and will ship in a future SDK release.