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
"Code actions of kind 'quickfix 'requested but returned code action is of kind 'refactor.extract'." #2854
I'm getting the same error. Is there anything I can do to help with the diagnosis?
[2021-01-07 18:27:34.459] [exthost] [warning] Dart-Code.dart-code - Code actions of kind 'source 'requested but returned code action is of kind 'refactor.surround.block'. Code action will be dropped. Please check 'CodeActionContext.only' to only return requested code actions.
[2021-01-07 18:27:34.459] [exthost] [warning] Dart-Code.dart-code - Code actions of kind 'source 'requested but returned code action is of kind 'refactor.surround.if'. Code action will be dropped. Please check 'CodeActionContext.only' to only return requested code actions.
[2021-01-07 18:27:34.459] [exthost] [warning] Dart-Code.dart-code - Code actions of kind 'source 'requested but returned code action is of kind 'refactor.surround.while'. Code action will be dropped. Please check 'CodeActionContext.only' to only return requested code actions.
[2021-01-07 18:27:34.459] [exthost] [warning] Dart-Code.dart-code - Code actions of kind 'source 'requested but returned code action is of kind 'refactor.surround.forIn'. Code action will be dropped. Please check 'CodeActionContext.only' to only return requested code actions.
[2021-01-07 18:27:34.459] [exthost] [warning] Dart-Code.dart-code - Code actions of kind 'source 'requested but returned code action is of kind 'refactor.surround.forEach'. Code action will be dropped. Please check 'CodeActionContext.only' to only return requested code actions.
[2021-01-07 18:27:34.459] [exthost] [warning] Dart-Code.dart-code - Code actions of kind 'source 'requested but returned code action is of kind 'refactor.surround.doWhile'. Code action will be dropped. Please check 'CodeActionContext.only' to only return requested code actions.
[2021-01-07 18:27:34.459] [exthost] [warning] Dart-Code.dart-code - Code actions of kind 'source 'requested but returned code action is of kind 'refactor.surround.tryCatch'. Code action will be dropped. Please check 'CodeActionContext.only' to only return requested code actions.
[2021-01-07 18:27:34.459] [exthost] [warning] Dart-Code.dart-code - Code actions of kind 'source 'requested but returned code action is of kind 'refactor.surround.tryFinally'. Code action will be dropped. Please check 'CodeActionContext.only' to only return requested code actions.
[2021-01-07 18:27:34.459] [exthost] [warning] Dart-Code.dart-code - Code actions of kind 'source 'requested but returned code action is of kind 'refactor.convert.bodyToExpression'. Code action will be dropped. Please check 'CodeActionContext.only' to only return requested code actions.
[2021-01-07 18:27:34.459] [exthost] [warning] Dart-Code.dart-code - Code actions of kind 'source 'requested but returned code action is of kind 'refactor.extract'. Code action will be dropped. Please check 'CodeActionContext.only' to only return requested code actions.
Now when pressing Cmd+. it triggers this message when the server returns non-convert items (for example surround assists). Looking at the server code, it's doing no filtering whatsoever, which explains the issue.
Activity
DanTup commentedon Oct 8, 2020
Can't currently repro on Dart or Flutter, LSP on or off.
bsutton commentedon Jan 7, 2021
I'm getting the same error. Is there anything I can do to help with the diagnosis?
I'm running dart 2.10.4 LSP.
DanTup commentedon Jan 7, 2021
@bsutton do you know what steps trigger it?
DanTup commentedon Jan 26, 2021
Found a way to reproduce this. Seems like VS Code doesn't offer send
only, but you can force it with a keybind to filter the list:Now when pressing
Cmd+.it triggers this message when the server returns non-convert items (for examplesurroundassists). Looking at the server code, it's doing no filtering whatsoever, which explains the issue.[analyzer] Filter code actions returned from LSP server based on para…
DanTup commentedon Feb 12, 2021
Fixed by dart-lang/sdk@2352926.