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

@ -16,6 +16,7 @@ path = "src/eval.rs"
[dependencies]
clap.workspace = true
anyhow.workspace = true
ureq_client.workspace = true
client.workspace = true
clock.workspace = true
collections.workspace = true
@ -24,7 +25,6 @@ feature_flags.workspace = true
fs.workspace = true
git.workspace = true
gpui.workspace = true
isahc_http_client.workspace = true
language.workspace = true
languages.workspace = true
http_client.workspace = true

View file

@ -32,6 +32,7 @@ use std::{
Arc,
},
};
use ureq_client::UreqClient;
const CODESEARCH_NET_DIR: &'static str = "target/datasets/code-search-net";
const EVAL_REPOS_DIR: &'static str = "target/datasets/eval-repos";
@ -100,7 +101,11 @@ fn main() -> Result<()> {
gpui::App::headless().run(move |cx| {
let executor = cx.background_executor().clone();
let client = isahc_http_client::IsahcHttpClient::new(None, None);
let client = Arc::new(UreqClient::new(
None,
"Zed LLM evals".to_string(),
executor.clone(),
));
cx.set_http_client(client.clone());
match cli.command {
Commands::Fetch {} => {