Clean up after isahc_http_client introduction (#18045)

This PR does some clean up after #15446.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-09-18 19:39:15 -04:00 committed by GitHub
parent a62e8f6396
commit 2cd9a88f53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 9 additions and 9 deletions

View file

@ -174,9 +174,6 @@ members = [
default-members = ["crates/zed"]
[workspace.dependencies]
#
# Workspace member crates
#
@ -216,7 +213,6 @@ file_icons = { path = "crates/file_icons" }
fs = { path = "crates/fs" }
fsevent = { path = "crates/fsevent" }
fuzzy = { path = "crates/fuzzy" }
isahc_http_client = { path = "crates/isahc_http_client" }
git = { path = "crates/git" }
git_hosting_providers = { path = "crates/git_hosting_providers" }
go_to_line = { path = "crates/go_to_line" }
@ -231,6 +227,7 @@ image_viewer = { path = "crates/image_viewer" }
indexed_docs = { path = "crates/indexed_docs" }
inline_completion_button = { path = "crates/inline_completion_button" }
install_cli = { path = "crates/install_cli" }
isahc_http_client = { path = "crates/isahc_http_client" }
journal = { path = "crates/journal" }
language = { path = "crates/language" }
language_model = { path = "crates/language_model" }

View file

@ -36,8 +36,8 @@ envy = "0.4.2"
futures.workspace = true
google_ai.workspace = true
hex.workspace = true
isahc_http_client.workspace = true
http_client.workspace = true
isahc_http_client.workspace = true
jsonwebtoken.workspace = true
live_kit_server.workspace = true
log.workspace = true

View file

@ -956,7 +956,6 @@ impl Server {
tracing::info!("connection opened");
let user_agent = format!("Zed Server/{}", env!("CARGO_PKG_VERSION"));
let http_client = match IsahcHttpClient::builder().default_header("User-Agent", user_agent).build() {
Ok(http_client) => Arc::new(IsahcHttpClient::from(http_client)),

View file

@ -827,6 +827,7 @@ impl ExtensionStore {
let mut extension_manifest =
ExtensionManifest::load(fs.clone(), &extension_source_path).await?;
let extension_id = extension_manifest.id.clone();
if !this.update(&mut cx, |this, cx| {
match this.outstanding_operations.entry(extension_id.clone()) {
btree_map::Entry::Occupied(_) => return false,
@ -850,6 +851,7 @@ impl ExtensionStore {
.ok();
}
});
cx.background_executor()
.spawn({
let extension_source_path = extension_source_path.clone();
@ -880,8 +882,10 @@ impl ExtensionStore {
bail!("extension {extension_id} is already installed");
}
}
fs.create_symlink(output_path, extension_source_path)
.await?;
this.update(&mut cx, |this, cx| this.reload(None, cx))?
.await;
Ok(())

View file

@ -15,8 +15,8 @@ test-support = []
path = "src/isahc_http_client.rs"
[dependencies]
anyhow.workspace = true
futures.workspace = true
http_client.workspace = true
isahc.workspace = true
futures.workspace = true
anyhow.workspace = true
util.workspace = true

View file

@ -47,7 +47,6 @@ file_finder.workspace = true
file_icons.workspace = true
fs.workspace = true
futures.workspace = true
isahc_http_client.workspace = true
git.workspace = true
git_hosting_providers.workspace = true
go_to_line.workspace = true
@ -58,6 +57,7 @@ image_viewer.workspace = true
inline_completion_button.workspace = true
install_cli.workspace = true
isahc.workspace = true
isahc_http_client.workspace = true
journal.workspace = true
language.workspace = true
language_model.workspace = true