-
Notifications
You must be signed in to change notification settings - Fork 300
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
Quick fixes are ordered badly #4203
Labels
in editor
Relates to code editing or language features
is bug
relies on sdk changes
Something that requires changes in the Dart/Flutter SDK to ship before it will become available
Milestone
Comments
Seems to depend on the specific text.. changing This seems to be match the order from the server: {
"id": 134,
"jsonrpc": "2.0",
"result": [
{
"kind": "source.sortMembers",
"title": "Sort Members"
},
{
"kind": "source.organizeImports",
"title": "Organize Imports"
},
{
"kind": "source.fixAll",
"title": "Fix All"
},
{
"kind": "refactor.extract",
"title": "Extract Method"
},
{
"kind": "refactor.extract",
"title": "Extract Local Variable"
},
{
"diagnostics": [],
"edit": {},
"kind": "quickfix.create.localVariable",
"title": "Create local variable 'Uint8List'"
},
{
"diagnostics": [],
"edit": {},
"kind": "quickfix.remove.unusedLocalVariable",
"title": "Remove unused local variable"
},
{
"diagnostics": [],
"edit": {},
"kind": "quickfix.ignore.line",
"title": "Ignore 'prefer_final_locals' for this line"
},
{
"diagnostics": [],
"edit": {},
"kind": "quickfix.ignore.line",
"title": "Ignore 'unused_local_variable' for this line"
},
{
"diagnostics": [],
"edit": {},
"kind": "quickfix.ignore.file",
"title": "Ignore 'prefer_final_locals' for this file"
},
{
"diagnostics": [],
"edit": {},
"kind": "quickfix.ignore.file",
"title": "Ignore 'unused_local_variable' for this file"
},
{
"diagnostics": [],
"edit": {},
"kind": "quickfix.create.class",
"title": "Create class 'Uint8List'"
},
{
"diagnostics": [],
"edit": {},
"kind": "quickfix.create.mixin",
"title": "Create mixin 'Uint8List'"
},
{
"diagnostics": [],
"edit": {},
"kind": "quickfix.import.librarySdk",
"title": "Import library 'dart:typed_data'"
}
]
} |
The cause of this was that we de-dupe when there are overlapping fixes on the same line. The de-duping code created a new "combined" CodeAction which was not storing its priority properly, and always being sorted last. |
copybara-service bot
pushed a commit
to dart-lang/sdk
that referenced
this issue
Oct 31, 2022
…n if de-duped Fixes Dart-Code/Dart-Code#4203. Change-Id: I3be943539e64481a9de2d2d2d88fa664962ef87b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266680 Commit-Queue: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Fixed by dart-lang/sdk@00ca14f. |
DanTup
added
the
relies on sdk changes
Something that requires changes in the Dart/Flutter SDK to ship before it will become available
label
Oct 31, 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
is bug
relies on sdk changes
Something that requires changes in the Dart/Flutter SDK to ship before it will become available
I would expect all
ignores
to be further down, and the "add import" to further up. Not sure if it's VS Code's new menu or a server issue.The text was updated successfully, but these errors were encountered: