0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-18 19:33:00 -05:00

Revert "fix(lsp): silence debug error for 'move to a new file' action (#27780)" (#27903)

This commit is contained in:
Nayeem Rahman 2025-02-01 02:53:24 +00:00 committed by Bartek Iwańczuk
parent 047b709472
commit 6f0cb697b6
No known key found for this signature in database
GPG key ID: 0C6BCDDC3B3AD750

View file

@ -1880,7 +1880,7 @@ impl Inner {
})?; })?;
let asset_or_doc = self.get_asset_or_document(&action_data.specifier)?; let asset_or_doc = self.get_asset_or_document(&action_data.specifier)?;
let line_index = asset_or_doc.line_index(); let line_index = asset_or_doc.line_index();
let refactor_edit_info = self let mut refactor_edit_info = self
.ts_server .ts_server
.get_edits_for_refactor( .get_edits_for_refactor(
self.snapshot(), self.snapshot(),
@ -1901,10 +1901,7 @@ impl Inner {
)), )),
asset_or_doc.scope().cloned(), asset_or_doc.scope().cloned(),
) )
.await; .await?;
match refactor_edit_info {
Ok(mut refactor_edit_info) => {
if kind_suffix == ".rewrite.function.returnType" if kind_suffix == ".rewrite.function.returnType"
|| kind_suffix == ".move.newFile" || kind_suffix == ".move.newFile"
{ {
@ -1917,18 +1914,6 @@ impl Inner {
)? )?
} }
code_action.edit = refactor_edit_info.to_workspace_edit(self)?; code_action.edit = refactor_edit_info.to_workspace_edit(self)?;
}
Err(err) => {
// TODO(nayeemrmn): Investigate cause for
// https://github.com/denoland/deno/issues/27778. Prevent popups for
// this error for now.
if kind_suffix == ".move.newFile" {
lsp_warn!("{:#}", err);
} else {
return Err(err);
}
}
}
code_action code_action
} else { } else {
// The code action doesn't need to be resolved // The code action doesn't need to be resolved