Replace isahc with async ureq (#18414)

REplace isahc with ureq everywhere gpui is used.

This should allow us to make http requests without libssl; and avoid a
long-tail of panics caused by ishac.

Release Notes:

- (potentially breaking change) updated our http client

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
Conrad Irwin 2024-10-03 01:00:48 +05:30 committed by GitHub
parent f809787275
commit 3a5deb5c6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 1068 additions and 401 deletions

View file

@ -51,7 +51,7 @@ workspace.workspace = true
worktree.workspace = true
[dev-dependencies]
isahc_http_client.workspace = true
ureq_client.workspace = true
env_logger.workspace = true
client = { workspace = true, features = ["test-support"] }
fs = { workspace = true, features = ["test-support"] }

View file

@ -2,7 +2,6 @@ use client::Client;
use futures::channel::oneshot;
use gpui::App;
use http_client::HttpClientWithUrl;
use isahc_http_client::IsahcHttpClient;
use language::language_settings::AllLanguageSettings;
use project::Project;
use semantic_index::{OpenAiEmbeddingModel, OpenAiEmbeddingProvider, SemanticDb};
@ -29,7 +28,11 @@ fn main() {
let clock = Arc::new(FakeSystemClock::default());
let http = Arc::new(HttpClientWithUrl::new(
IsahcHttpClient::new(None, None),
Arc::new(ureq_client::UreqClient::new(
None,
"Zed semantic index example".to_string(),
cx.background_executor().clone(),
)),
"http://localhost:11434",
None,
));