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
Sort members command deletes comment from import #2762
On a .dart file, the comments to the right of an import get deleted when running the sort members command.
this is the minimal file with which I was able to reproduce it.
import '../a.dart'; //test
import '../b.dart';
after I run the Sort Members command the comment //test gets deleted.
If I only have a single import directive, the comment does NOT disappear. Only happens with 2 or more imports.
[✓] Flutter (Channel stable, 1.20.2, on Mac OS X 10.15.6 19G2021, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0-rc4)
[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.48.2)
Thanks for the report! I think this is the same as dart-lang/sdk#42515 but Sort Members and Organize Imports have their own code paths so they need to be consolidated so Sort Members also gets this fix.
Activity
DanTup commentedon Sep 2, 2020
Thanks for the report! I think this is the same as dart-lang/sdk#42515 but Sort Members and Organize Imports have their own code paths so they need to be consolidated so Sort Members also gets this fix.
DanTup commentedon Sep 7, 2020
Got a fix in progress at https://dart-review.googlesource.com/c/sdk/+/161786/.
DanTup commentedon Sep 22, 2020
Fixed by dart-lang/sdk@d3b0979. You won't see the fix until you're on an updated SDK that includes that change.