Fix unzipping clangd and codelldb on Windows (#31080)

Closes https://github.com/zed-industries/zed/pull/30454

Release Notes:

- N/A
This commit is contained in:
Kirill Bulatov 2025-05-21 21:17:14 +03:00 committed by GitHub
parent c8f56e38b1
commit 6e5996a815
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 93 additions and 70 deletions

View file

@ -348,11 +348,11 @@ impl LocalLspStore {
delegate.update_status(
adapter.name(),
BinaryStatus::Failed {
error: format!("{err}\n-- stderr--\n{}", log),
error: format!("{err}\n-- stderr--\n{log}"),
},
);
log::error!("Failed to start language server {server_name:?}: {err}");
log::error!("server stderr: {:?}", log);
log::error!("Failed to start language server {server_name:?}: {err:#?}");
log::error!("server stderr: {log}");
None
}
}

View file

@ -15,7 +15,7 @@ use anyhow::Result;
use collections::HashMap;
use fs::Fs;
use gpui::{App, AppContext as _, Context, Entity, Task};
use util::ResultExt;
use util::{ResultExt, archive::extract_zip};
pub(crate) struct YarnPathStore {
temp_dirs: HashMap<Arc<Path>, tempfile::TempDir>,
@ -131,7 +131,7 @@ fn zip_path(path: &Path) -> Option<&Path> {
async fn dump_zip(path: Arc<Path>, fs: Arc<dyn Fs>) -> Result<tempfile::TempDir> {
let dir = tempfile::tempdir()?;
let contents = fs.load_bytes(&path).await?;
node_runtime::extract_zip(dir.path(), futures::io::Cursor::new(contents)).await?;
extract_zip(dir.path(), futures::io::Cursor::new(contents)).await?;
Ok(dir)
}