Restore HTTP client transition, but use reqwest everywhere (#19055)

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki 2024-10-11 14:58:58 -07:00 committed by GitHub
parent c709b66f35
commit 22ac178f9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 838 additions and 418 deletions

View file

@ -56,7 +56,6 @@ wit-component.workspace = true
workspace.workspace = true
[dev-dependencies]
isahc_http_client.workspace = true
ctor.workspace = true
env_logger.workspace = true
fs = { workspace = true, features = ["test-support"] }
@ -64,5 +63,5 @@ gpui = { workspace = true, features = ["test-support"] }
language = { workspace = true, features = ["test-support"] }
parking_lot.workspace = true
project = { workspace = true, features = ["test-support"] }
tokio.workspace = true
reqwest_client.workspace = true
workspace = { workspace = true, features = ["test-support"] }

View file

@ -13,12 +13,12 @@ use futures::{io::BufReader, AsyncReadExt, StreamExt};
use gpui::{Context, SemanticVersion, TestAppContext};
use http_client::{FakeHttpClient, Response};
use indexed_docs::IndexedDocsRegistry;
use isahc_http_client::IsahcHttpClient;
use language::{LanguageMatcher, LanguageRegistry, LanguageServerBinaryStatus, LanguageServerName};
use node_runtime::NodeRuntime;
use parking_lot::Mutex;
use project::{Project, DEFAULT_COMPLETION_CONTEXT};
use release_channel::AppVersion;
use reqwest_client::ReqwestClient;
use serde_json::json;
use settings::{Settings as _, SettingsStore};
use snippet_provider::SnippetRegistry;
@ -576,7 +576,8 @@ async fn test_extension_store_with_test_extension(cx: &mut TestAppContext) {
std::env::consts::ARCH
)
});
let builder_client = IsahcHttpClient::new(None, Some(user_agent));
let builder_client =
Arc::new(ReqwestClient::user_agent(&user_agent).expect("Could not create HTTP client"));
let extension_store = cx.new_model(|cx| {
ExtensionStore::new(