diff --git a/Cargo.lock b/Cargo.lock index 71ed0c038f7de6379cfdc465601dda633fb4cdfb..714d14ff708b56871754b0ee7a38cc09c8831d72 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -248,7 +248,7 @@ version = "0.1.0" dependencies = [ "anyhow", "futures 0.3.28", - "http 0.1.0", + "http_client", "isahc", "schemars", "serde", @@ -392,7 +392,7 @@ dependencies = [ "gpui", "heed", "html_to_markdown 0.1.0", - "http 0.1.0", + "http_client", "indexed_docs", "indoc", "language", @@ -955,7 +955,7 @@ dependencies = [ "db", "editor", "gpui", - "http 0.1.0", + "http_client", "isahc", "log", "markdown_preview", @@ -1876,7 +1876,7 @@ dependencies = [ "fs", "futures 0.3.28", "gpui", - "http 0.1.0", + "http_client", "language", "live_kit_client", "log", @@ -2104,7 +2104,7 @@ dependencies = [ "collections", "futures 0.3.28", "gpui", - "http 0.1.0", + "http_client", "language", "log", "rand 0.8.5", @@ -2315,8 +2315,7 @@ dependencies = [ "fs", "futures 0.3.28", "gpui", - "http 0.1.0", - "isahc", + "http_client", "lazy_static", "log", "once_cell", @@ -2434,7 +2433,7 @@ dependencies = [ "gpui", "headless", "hex", - "http 0.1.0", + "http_client", "indoc", "language", "language_model", @@ -2507,7 +2506,7 @@ dependencies = [ "futures 0.3.28", "fuzzy", "gpui", - "http 0.1.0", + "http_client", "language", "lazy_static", "menu", @@ -2704,7 +2703,7 @@ dependencies = [ "fs", "futures 0.3.28", "gpui", - "http 0.1.0", + "http_client", "indoc", "language", "lsp", @@ -3537,7 +3536,7 @@ dependencies = [ "fuzzy", "git", "gpui", - "http 0.1.0", + "http_client", "indoc", "itertools 0.11.0", "language", @@ -3860,7 +3859,7 @@ dependencies = [ "fs", "futures 0.3.28", "gpui", - "http 0.1.0", + "http_client", "indexed_docs", "isahc", "language", @@ -3901,7 +3900,7 @@ dependencies = [ "env_logger", "extension", "fs", - "http 0.1.0", + "http_client", "language", "log", "rpc", @@ -4019,7 +4018,7 @@ dependencies = [ "editor", "futures 0.3.28", "gpui", - "http 0.1.0", + "http_client", "human_bytes", "isahc", "language", @@ -4624,7 +4623,7 @@ dependencies = [ "derive_more", "git2", "gpui", - "http 0.1.0", + "http_client", "lazy_static", "log", "parking_lot", @@ -4664,7 +4663,7 @@ dependencies = [ "futures 0.3.28", "git", "gpui", - "http 0.1.0", + "http_client", "isahc", "pretty_assertions", "regex", @@ -4748,7 +4747,7 @@ version = "0.1.0" dependencies = [ "anyhow", "futures 0.3.28", - "http 0.1.0", + "http_client", "serde", "serde_json", ] @@ -4818,7 +4817,7 @@ dependencies = [ "foreign-types 0.5.0", "futures 0.3.28", "gpui_macros", - "http 0.1.0", + "http_client", "image", "itertools 0.11.0", "lazy_static", @@ -5180,21 +5179,6 @@ dependencies = [ "regex", ] -[[package]] -name = "http" -version = "0.1.0" -dependencies = [ - "anyhow", - "derive_more", - "futures 0.3.28", - "futures-lite 1.13.0", - "isahc", - "log", - "serde", - "serde_json", - "url", -] - [[package]] name = "http" version = "0.2.9" @@ -5234,6 +5218,22 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" +[[package]] +name = "http_client" +version = "0.1.0" +dependencies = [ + "anyhow", + "derive_more", + "futures 0.3.28", + "futures-lite 1.13.0", + "http 1.0.0", + "isahc", + "log", + "serde", + "serde_json", + "url", +] + [[package]] name = "httparse" version = "1.8.0" @@ -5437,7 +5437,7 @@ dependencies = [ "gpui", "heed", "html_to_markdown 0.1.0", - "http 0.1.0", + "http_client", "indexmap 1.9.3", "indoc", "parking_lot", @@ -5877,7 +5877,7 @@ dependencies = [ "git", "globset", "gpui", - "http 0.1.0", + "http_client", "indoc", "itertools 0.11.0", "lazy_static", @@ -5929,7 +5929,7 @@ dependencies = [ "feature_flags", "futures 0.3.28", "gpui", - "http 0.1.0", + "http_client", "language", "log", "menu", @@ -6004,7 +6004,7 @@ dependencies = [ "feature_flags", "futures 0.3.28", "gpui", - "http 0.1.0", + "http_client", "language", "lazy_static", "log", @@ -6771,7 +6771,7 @@ dependencies = [ "async-trait", "async_zip", "futures 0.3.28", - "http 0.1.0", + "http_client", "log", "paths", "semver", @@ -7110,7 +7110,7 @@ version = "0.1.0" dependencies = [ "anyhow", "futures 0.3.28", - "http 0.1.0", + "http_client", "isahc", "schemars", "serde", @@ -7181,7 +7181,7 @@ version = "0.1.0" dependencies = [ "anyhow", "futures 0.3.28", - "http 0.1.0", + "http_client", "isahc", "schemars", "serde", @@ -7986,7 +7986,7 @@ dependencies = [ "git2", "globset", "gpui", - "http 0.1.0", + "http_client", "itertools 0.11.0", "language", "log", @@ -8631,7 +8631,7 @@ dependencies = [ "fs", "futures 0.3.28", "gpui", - "http 0.1.0", + "http_client", "language", "log", "node_runtime", @@ -8679,7 +8679,7 @@ dependencies = [ "env_logger", "futures 0.3.28", "gpui", - "http 0.1.0", + "http_client", "image", "language", "log", @@ -9438,7 +9438,7 @@ dependencies = [ "futures-batch", "gpui", "heed", - "http 0.1.0", + "http_client", "language", "languages", "log", @@ -10395,7 +10395,7 @@ dependencies = [ "env_logger", "futures 0.3.28", "gpui", - "http 0.1.0", + "http_client", "language", "log", "postage", @@ -10417,7 +10417,7 @@ version = "0.1.0" dependencies = [ "anyhow", "futures 0.3.28", - "http 0.1.0", + "http_client", "paths", "serde", "serde_json", @@ -10827,7 +10827,7 @@ dependencies = [ "ctor", "env_logger", "gpui", - "http 0.1.0", + "http_client", "lazy_static", "log", "parking_lot", @@ -11093,7 +11093,7 @@ dependencies = [ "extensions_ui", "feedback", "gpui", - "http 0.1.0", + "http_client", "notifications", "pretty_assertions", "project", @@ -13320,7 +13320,7 @@ dependencies = [ "fs", "futures 0.3.28", "gpui", - "http 0.1.0", + "http_client", "itertools 0.11.0", "language", "lazy_static", @@ -13357,7 +13357,7 @@ dependencies = [ "git", "git2", "gpui", - "http 0.1.0", + "http_client", "ignore", "language", "log", @@ -13646,7 +13646,7 @@ dependencies = [ "go_to_line", "gpui", "headless", - "http 0.1.0", + "http_client", "image_viewer", "inline_completion_button", "install_cli", diff --git a/Cargo.toml b/Cargo.toml index 95d17adef950702a826ee5b6fb34762d64c9f48f..a0732591beb352bf433bccd49fecc6b99e6681a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,7 +44,7 @@ members = [ "crates/gpui_macros", "crates/headless", "crates/html_to_markdown", - "crates/http", + "crates/http_client", "crates/image_viewer", "crates/indexed_docs", "crates/inline_completion_button", @@ -167,6 +167,7 @@ assets = { path = "crates/assets" } assistant = { path = "crates/assistant" } assistant_slash_command = { path = "crates/assistant_slash_command" } assistant_tooling = { path = "crates/assistant_tooling" } +async-tungstenite = { version = "0.23" } audio = { path = "crates/audio" } auto_update = { path = "crates/auto_update" } breadcrumbs = { path = "crates/breadcrumbs" } @@ -203,7 +204,7 @@ gpui = { path = "crates/gpui" } gpui_macros = { path = "crates/gpui_macros" } headless = { path = "crates/headless" } html_to_markdown = { path = "crates/html_to_markdown" } -http = { path = "crates/http" } +http_client = { path = "crates/http_client" } image_viewer = { path = "crates/image_viewer" } indexed_docs = { path = "crates/indexed_docs" } inline_completion_button = { path = "crates/inline_completion_button" } diff --git a/crates/anthropic/Cargo.toml b/crates/anthropic/Cargo.toml index 0ea24d5c0770bfcc4f5db23b055c88c528fb6c5c..2d7da211a40a2cc260149ecc8c7eaa72d68d4db8 100644 --- a/crates/anthropic/Cargo.toml +++ b/crates/anthropic/Cargo.toml @@ -18,7 +18,7 @@ path = "src/anthropic.rs" [dependencies] anyhow.workspace = true futures.workspace = true -http.workspace = true +http_client.workspace = true isahc.workspace = true schemars = { workspace = true, optional = true } serde.workspace = true diff --git a/crates/anthropic/src/anthropic.rs b/crates/anthropic/src/anthropic.rs index 62f796cf256945bc3f69d5a8cf48910ad36bd891..d6efdff779e386879134607b2339b7d006a911fd 100644 --- a/crates/anthropic/src/anthropic.rs +++ b/crates/anthropic/src/anthropic.rs @@ -1,6 +1,6 @@ use anyhow::{anyhow, Result}; use futures::{io::BufReader, stream::BoxStream, AsyncBufReadExt, AsyncReadExt, StreamExt}; -use http::{AsyncBody, HttpClient, Method, Request as HttpRequest}; +use http_client::{AsyncBody, HttpClient, Method, Request as HttpRequest}; use isahc::config::Configurable; use serde::{Deserialize, Serialize}; use std::{convert::TryFrom, time::Duration}; diff --git a/crates/assistant/Cargo.toml b/crates/assistant/Cargo.toml index 4c371377f4850e198451a44efaf185250bd7ae40..a284b289a8e147d5fba3444a21430cdd891adffe 100644 --- a/crates/assistant/Cargo.toml +++ b/crates/assistant/Cargo.toml @@ -41,7 +41,7 @@ fuzzy.workspace = true gpui.workspace = true heed.workspace = true html_to_markdown.workspace = true -http.workspace = true +http_client.workspace = true indexed_docs.workspace = true indoc.workspace = true language.workspace = true diff --git a/crates/assistant/src/slash_command/fetch_command.rs b/crates/assistant/src/slash_command/fetch_command.rs index c99bf438fbc20626a344dffc4b311aed212a742d..8934d68c1638439ae5821f10de48caf61d888a7e 100644 --- a/crates/assistant/src/slash_command/fetch_command.rs +++ b/crates/assistant/src/slash_command/fetch_command.rs @@ -10,7 +10,7 @@ use assistant_slash_command::{ use futures::AsyncReadExt; use gpui::{AppContext, Task, WeakView}; use html_to_markdown::{convert_html_to_markdown, markdown, TagHandler}; -use http::{AsyncBody, HttpClient, HttpClientWithUrl}; +use http_client::{AsyncBody, HttpClient, HttpClientWithUrl}; use language::LspAdapterDelegate; use ui::prelude::*; use workspace::Workspace; diff --git a/crates/auto_update/Cargo.toml b/crates/auto_update/Cargo.toml index 105758a7ce5abbecc9df04faf97071acc52e04ab..12e669780d83d77b0eff6ecf6d84f3ab9daa6804 100644 --- a/crates/auto_update/Cargo.toml +++ b/crates/auto_update/Cargo.toml @@ -18,7 +18,7 @@ client.workspace = true db.workspace = true editor.workspace = true gpui.workspace = true -http.workspace = true +http_client.workspace = true isahc.workspace = true log.workspace = true markdown_preview.workspace = true diff --git a/crates/auto_update/src/auto_update.rs b/crates/auto_update/src/auto_update.rs index bbeb2319e6ef1da999d3ad3455344516df4d8a7a..b6868f56430ebe9632d5f7db59fec9eff12f3139 100644 --- a/crates/auto_update/src/auto_update.rs +++ b/crates/auto_update/src/auto_update.rs @@ -20,7 +20,7 @@ use smol::{fs, io::AsyncReadExt}; use settings::{Settings, SettingsSources, SettingsStore}; use smol::{fs::File, process::Command}; -use http::{HttpClient, HttpClientWithUrl}; +use http_client::{HttpClient, HttpClientWithUrl}; use release_channel::{AppCommitSha, AppVersion, ReleaseChannel}; use std::{ env::{ diff --git a/crates/call/Cargo.toml b/crates/call/Cargo.toml index 70249eb533d571f8e77ae4f6a78948bec6584dbc..468d381258309683af3981b478db832adf0ed936 100644 --- a/crates/call/Cargo.toml +++ b/crates/call/Cargo.toml @@ -51,4 +51,4 @@ language = { workspace = true, features = ["test-support"] } live_kit_client = { workspace = true, features = ["test-support"] } project = { workspace = true, features = ["test-support"] } util = { workspace = true, features = ["test-support"] } -http = { workspace = true, features = ["test-support"] } +http_client = { workspace = true, features = ["test-support"] } diff --git a/crates/channel/Cargo.toml b/crates/channel/Cargo.toml index 5aed4a629d413d2d4d125bbb7b2aadb5bbf8bae9..77179eea9328781f487adab8eed12e2a71837074 100644 --- a/crates/channel/Cargo.toml +++ b/crates/channel/Cargo.toml @@ -40,4 +40,4 @@ rpc = { workspace = true, features = ["test-support"] } client = { workspace = true, features = ["test-support"] } settings = { workspace = true, features = ["test-support"] } util = { workspace = true, features = ["test-support"] } -http = { workspace = true, features = ["test-support"] } +http_client = { workspace = true, features = ["test-support"] } diff --git a/crates/channel/src/channel_store_tests.rs b/crates/channel/src/channel_store_tests.rs index 2dd3c0f81d68e7d3db0a0e5f935574d773ada821..1cf9fa706dc8b19b65fe401b9a18bf6dee036d72 100644 --- a/crates/channel/src/channel_store_tests.rs +++ b/crates/channel/src/channel_store_tests.rs @@ -4,7 +4,7 @@ use super::*; use client::{test::FakeServer, Client, UserStore}; use clock::FakeSystemClock; use gpui::{AppContext, Context, Model, SemanticVersion, TestAppContext}; -use http::FakeHttpClient; +use http_client::FakeHttpClient; use rpc::proto::{self}; use settings::SettingsStore; diff --git a/crates/client/Cargo.toml b/crates/client/Cargo.toml index 579e3297f6070468c0cd1e6e91265adf8900d0c9..387cc94a938045128cc419f1b9293efbfdff83bc 100644 --- a/crates/client/Cargo.toml +++ b/crates/client/Cargo.toml @@ -18,7 +18,7 @@ test-support = ["clock/test-support", "collections/test-support", "gpui/test-sup [dependencies] anyhow.workspace = true async-recursion = "0.3" -async-tungstenite = { version = "0.23", features = ["async-std", "async-native-tls"] } +async-tungstenite = { workspace = true, features = ["async-std", "async-native-tls"] } chrono = { workspace = true, features = ["serde"] } clock.workspace = true collections.workspace = true @@ -26,7 +26,7 @@ feature_flags.workspace = true fs.workspace = true futures.workspace = true gpui.workspace = true -http.workspace = true +http_client.workspace = true lazy_static.workspace = true log.workspace = true once_cell.workspace = true @@ -60,12 +60,11 @@ gpui = { workspace = true, features = ["test-support"] } rpc = { workspace = true, features = ["test-support"] } settings = { workspace = true, features = ["test-support"] } util = { workspace = true, features = ["test-support"] } -http = { workspace = true, features = ["test-support"] } +http_client = { workspace = true, features = ["test-support"] } [target.'cfg(target_os = "windows")'.dependencies] windows.workspace = true [target.'cfg(target_os = "macos")'.dependencies] cocoa.workspace = true -isahc = { workspace = true, features = ["static-curl"] } async-native-tls = { version = "0.5.0", features = ["vendored"] } diff --git a/crates/client/src/client.rs b/crates/client/src/client.rs index 99d05cb14679f09b3e912338df05c17340a25622..8c309f684647d7178724715bc6c66fefc35d18f6 100644 --- a/crates/client/src/client.rs +++ b/crates/client/src/client.rs @@ -20,7 +20,7 @@ use futures::{ use gpui::{ actions, AnyModel, AnyWeakModel, AppContext, AsyncAppContext, Global, Model, Task, WeakModel, }; -use http::{HttpClient, HttpClientWithUrl}; +use http_client::{AsyncBody, HttpClient, HttpClientWithUrl}; use lazy_static::lazy_static; use parking_lot::RwLock; use postage::watch; @@ -233,7 +233,7 @@ pub enum EstablishConnectionError { #[error("{0}")] Other(#[from] anyhow::Error), #[error("{0}")] - Http(#[from] http::Error), + Http(#[from] http_client::Error), #[error("{0}")] Io(#[from] std::io::Error), #[error("{0}")] @@ -1351,7 +1351,7 @@ impl Client { let mut url = self.rpc_url(http.clone(), None).await?; url.set_path("/user"); url.set_query(Some(&format!("github_login={login}"))); - let request = Request::get(url.as_str()) + let request: http_client::Request = Request::get(url.as_str()) .header("Authorization", format!("token {api_token}")) .body("".into())?; @@ -1783,7 +1783,7 @@ mod tests { use clock::FakeSystemClock; use gpui::{BackgroundExecutor, Context, TestAppContext}; - use http::FakeHttpClient; + use http_client::FakeHttpClient; use parking_lot::Mutex; use proto::TypedEnvelope; use settings::SettingsStore; diff --git a/crates/client/src/telemetry.rs b/crates/client/src/telemetry.rs index 55f263f42ee3d0a9b2cce939c1ede9604cad4522..e648c90032b11a10cb570f900a2792ce1e3d1aae 100644 --- a/crates/client/src/telemetry.rs +++ b/crates/client/src/telemetry.rs @@ -6,7 +6,7 @@ use clock::SystemClock; use collections::{HashMap, HashSet}; use futures::Future; use gpui::{AppContext, BackgroundExecutor, Task}; -use http::{self, HttpClient, HttpClientWithUrl, Method}; +use http_client::{self, HttpClient, HttpClientWithUrl, Method}; use once_cell::sync::Lazy; use parking_lot::Mutex; use release_channel::ReleaseChannel; @@ -632,7 +632,7 @@ impl Telemetry { let checksum = calculate_json_checksum(&json_bytes).unwrap_or("".to_string()); - let request = http::Request::builder() + let request = http_client::Request::builder() .method(Method::POST) .uri( this.http_client @@ -661,7 +661,7 @@ mod tests { use chrono::TimeZone; use clock::FakeSystemClock; use gpui::TestAppContext; - use http::FakeHttpClient; + use http_client::FakeHttpClient; #[gpui::test] fn test_telemetry_flush_on_max_queue_size(cx: &mut TestAppContext) { diff --git a/crates/collab/Cargo.toml b/crates/collab/Cargo.toml index a0f3cdc2949dc26e301aeb897192a72c1617d74b..54fe12fab01e6cec03c0de9ae7897952f6e8fbc4 100644 --- a/crates/collab/Cargo.toml +++ b/crates/collab/Cargo.toml @@ -20,7 +20,7 @@ test-support = ["sqlite"] [dependencies] anthropic.workspace = true anyhow.workspace = true -async-tungstenite = "0.23" +async-tungstenite.workspace = true aws-config = { version = "1.1.5" } aws-sdk-s3 = { version = "1.15.0" } axum = { version = "0.6", features = ["json", "headers", "ws"] } @@ -35,7 +35,7 @@ envy = "0.4.2" futures.workspace = true google_ai.workspace = true hex.workspace = true -http.workspace = true +http_client.workspace = true live_kit_server.workspace = true log.workspace = true nanoid.workspace = true diff --git a/crates/collab/src/rpc.rs b/crates/collab/src/rpc.rs index 0ee3b8d64b1a443e2926c42a851db32f85d6f05e..75f7e4941d1e340e061190883e6052de25f496e6 100644 --- a/crates/collab/src/rpc.rs +++ b/crates/collab/src/rpc.rs @@ -42,7 +42,7 @@ use futures::{ stream::FuturesUnordered, FutureExt, SinkExt, StreamExt, TryStreamExt, }; -use http::IsahcHttpClient; +use http_client::IsahcHttpClient; use prometheus::{register_int_gauge, IntGauge}; use rpc::{ proto::{ diff --git a/crates/collab/src/tests/test_server.rs b/crates/collab/src/tests/test_server.rs index 423455ea0b1be436efae4f18df7ae2803bc17905..88beedd35eb2b4fc277038e3285eb1334c419e3c 100644 --- a/crates/collab/src/tests/test_server.rs +++ b/crates/collab/src/tests/test_server.rs @@ -19,7 +19,7 @@ use fs::FakeFs; use futures::{channel::oneshot, StreamExt as _}; use git::GitHostingProviderRegistry; use gpui::{BackgroundExecutor, Context, Model, Task, TestAppContext, View, VisualTestContext}; -use http::FakeHttpClient; +use http_client::FakeHttpClient; use language::LanguageRegistry; use node_runtime::FakeNodeRuntime; use notifications::NotificationStore; diff --git a/crates/collab_ui/Cargo.toml b/crates/collab_ui/Cargo.toml index 6bfcca832b1f441dcd1f9e9d238aaccc2bb9d789..0333a96961e8fc36ab02fdc9f24917639cd8c54c 100644 --- a/crates/collab_ui/Cargo.toml +++ b/crates/collab_ui/Cargo.toml @@ -25,7 +25,7 @@ test-support = [ "settings/test-support", "util/test-support", "workspace/test-support", - "http/test-support", + "http_client/test-support", ] [dependencies] @@ -80,5 +80,5 @@ rpc = { workspace = true, features = ["test-support"] } settings = { workspace = true, features = ["test-support"] } tree-sitter-markdown.workspace = true util = { workspace = true, features = ["test-support"] } -http = { workspace = true, features = ["test-support"] } +http_client = { workspace = true, features = ["test-support"] } workspace = { workspace = true, features = ["test-support"] } diff --git a/crates/copilot/Cargo.toml b/crates/copilot/Cargo.toml index 70915ecab27187ccb68d15610b4da178bf632078..0fc3067eab139901c334db4383d0ff5470f4e395 100644 --- a/crates/copilot/Cargo.toml +++ b/crates/copilot/Cargo.toml @@ -32,7 +32,7 @@ command_palette_hooks.workspace = true editor.workspace = true futures.workspace = true gpui.workspace = true -http.workspace = true +http_client.workspace = true language.workspace = true lsp.workspace = true menu.workspace = true @@ -65,4 +65,4 @@ rpc = { workspace = true, features = ["test-support"] } settings = { workspace = true, features = ["test-support"] } theme = { workspace = true, features = ["test-support"] } util = { workspace = true, features = ["test-support"] } -http = { workspace = true, features = ["test-support"] } +http_client = { workspace = true, features = ["test-support"] } diff --git a/crates/copilot/src/copilot.rs b/crates/copilot/src/copilot.rs index 0a81475e33dfea529b1d72669c95544dbf0d36b1..71a0679e661e15dbad6a0f127d5e86d19ea4ca49 100644 --- a/crates/copilot/src/copilot.rs +++ b/crates/copilot/src/copilot.rs @@ -12,8 +12,8 @@ use gpui::{ actions, AppContext, AsyncAppContext, Context, Entity, EntityId, EventEmitter, Global, Model, ModelContext, Task, WeakModel, }; -use http::github::latest_github_release; -use http::HttpClient; +use http_client::github::latest_github_release; +use http_client::HttpClient; use language::{ language_settings::{all_language_settings, language_settings, InlineCompletionProvider}, point_from_lsp, point_to_lsp, Anchor, Bias, Buffer, BufferSnapshot, Language, PointUtf16, @@ -393,7 +393,7 @@ impl Copilot { Default::default(), cx.to_async(), ); - let http = http::FakeHttpClient::create(|_| async { unreachable!() }); + let http = http_client::FakeHttpClient::create(|_| async { unreachable!() }); let node_runtime = FakeNodeRuntime::new(); let this = cx.new_model(|cx| Self { server_id: LanguageServerId(0), diff --git a/crates/editor/Cargo.toml b/crates/editor/Cargo.toml index dae32ff5825ac06cc089b1847dc3e30bf7b77832..ab0a77c1dee899601ea51fa245b94f6958e21ba5 100644 --- a/crates/editor/Cargo.toml +++ b/crates/editor/Cargo.toml @@ -43,7 +43,7 @@ futures.workspace = true fuzzy.workspace = true git.workspace = true gpui.workspace = true -http.workspace = true +http_client.workspace = true indoc.workspace = true itertools.workspace = true language.workspace = true @@ -98,4 +98,4 @@ tree-sitter-typescript.workspace = true unindent.workspace = true util = { workspace = true, features = ["test-support"] } workspace = { workspace = true, features = ["test-support"] } -http = { workspace = true, features = ["test-support"] } +http_client = { workspace = true, features = ["test-support"] } diff --git a/crates/editor/src/git/blame.rs b/crates/editor/src/git/blame.rs index a7dac9c3f55e73261ef0d5838d1b751b40003d32..59dbbd6a9e93bb5c1a4e216cd568b28d8154ffb2 100644 --- a/crates/editor/src/git/blame.rs +++ b/crates/editor/src/git/blame.rs @@ -7,7 +7,7 @@ use git::{ parse_git_remote_url, GitHostingProvider, GitHostingProviderRegistry, Oid, PullRequest, }; use gpui::{Model, ModelContext, Subscription, Task}; -use http::HttpClient; +use http_client::HttpClient; use language::{markdown, Bias, Buffer, BufferSnapshot, Edit, LanguageRegistry, ParsedMarkdown}; use multi_buffer::MultiBufferRow; use project::{Item, Project}; diff --git a/crates/extension/Cargo.toml b/crates/extension/Cargo.toml index 8320681c73317a05517835017409b611a449435a..075292f450a648eb9a528a344a3b0bc6806fbffc 100644 --- a/crates/extension/Cargo.toml +++ b/crates/extension/Cargo.toml @@ -27,7 +27,7 @@ collections.workspace = true fs.workspace = true futures.workspace = true gpui.workspace = true -http.workspace = true +http_client.workspace = true indexed_docs.workspace = true isahc.workspace = true language.workspace = true diff --git a/crates/extension/src/extension_builder.rs b/crates/extension/src/extension_builder.rs index d1928b884dfe699040047c66df48e51a45fb9e93..1324c5d2ac08394074939a231590989619ec69bd 100644 --- a/crates/extension/src/extension_builder.rs +++ b/crates/extension/src/extension_builder.rs @@ -6,7 +6,7 @@ use async_compression::futures::bufread::GzipDecoder; use async_tar::Archive; use futures::io::BufReader; use futures::AsyncReadExt; -use http::{self, AsyncBody, HttpClient}; +use http_client::{self, AsyncBody, HttpClient}; use serde::Deserialize; use std::{ env, fs, mem, diff --git a/crates/extension/src/extension_store.rs b/crates/extension/src/extension_store.rs index 882c79d803084988e9afaef3a3bbbdc0ee722c5b..316c32832a96faf626b0ca74a439f1c36590e89f 100644 --- a/crates/extension/src/extension_store.rs +++ b/crates/extension/src/extension_store.rs @@ -33,7 +33,7 @@ use gpui::{ actions, AppContext, AsyncAppContext, Context, EventEmitter, Global, Model, ModelContext, Task, WeakModel, }; -use http::{AsyncBody, HttpClient, HttpClientWithUrl}; +use http_client::{AsyncBody, HttpClient, HttpClientWithUrl}; use indexed_docs::{IndexedDocsRegistry, ProviderId}; use language::{ LanguageConfig, LanguageMatcher, LanguageQueries, LanguageRegistry, QUERY_FILENAME_PREFIXES, @@ -244,7 +244,7 @@ impl ExtensionStore { installed_dir, index_path, builder: Arc::new(ExtensionBuilder::new( - http::client(http_client.proxy().cloned()), + ::http_client::client(http_client.proxy().cloned()), build_dir, )), outstanding_operations: Default::default(), diff --git a/crates/extension/src/extension_store_test.rs b/crates/extension/src/extension_store_test.rs index d975e2ca90076fe7c84e010f7d77cb92261be427..61e6bc3eec424652de43b8fd154cd09073ca47c1 100644 --- a/crates/extension/src/extension_store_test.rs +++ b/crates/extension/src/extension_store_test.rs @@ -11,7 +11,7 @@ use collections::BTreeMap; use fs::{FakeFs, Fs, RealFs}; use futures::{io::BufReader, AsyncReadExt, StreamExt}; use gpui::{Context, SemanticVersion, TestAppContext}; -use http::{FakeHttpClient, Response}; +use http_client::{FakeHttpClient, Response}; use indexed_docs::IndexedDocsRegistry; use language::{LanguageMatcher, LanguageRegistry, LanguageServerBinaryStatus, LanguageServerName}; use node_runtime::FakeNodeRuntime; diff --git a/crates/extension/src/wasm_host.rs b/crates/extension/src/wasm_host.rs index 8e982be8cdaa1dd543966c3540441f839cc08db5..d8afe520a139fa234e94005551370d4790d7430b 100644 --- a/crates/extension/src/wasm_host.rs +++ b/crates/extension/src/wasm_host.rs @@ -13,7 +13,7 @@ use futures::{ Future, FutureExt, StreamExt as _, }; use gpui::{AppContext, AsyncAppContext, BackgroundExecutor, Task}; -use http::HttpClient; +use http_client::HttpClient; use language::LanguageRegistry; use node_runtime::NodeRuntime; use release_channel::ReleaseChannel; diff --git a/crates/extension/src/wasm_host/wit/since_v0_0_7.rs b/crates/extension/src/wasm_host/wit/since_v0_0_7.rs index c610f669176ac99d27e7af7d4c9d2e53097398aa..faf238b0fa6e797dcd370a5e8672a31359304d15 100644 --- a/crates/extension/src/wasm_host/wit/since_v0_0_7.rs +++ b/crates/extension/src/wasm_host/wit/since_v0_0_7.rs @@ -1,4 +1,5 @@ use crate::wasm_host::{wit::ToWasmtimeResult, WasmState}; +use ::http_client::AsyncBody; use ::settings::Settings; use anyhow::{anyhow, bail, Context, Result}; use async_compression::futures::bufread::GzipDecoder; @@ -6,7 +7,6 @@ use async_tar::Archive; use async_trait::async_trait; use futures::AsyncReadExt; use futures::{io::BufReader, FutureExt as _}; -use http::AsyncBody; use indexed_docs::IndexedDocsDatabase; use language::{ language_settings::AllLanguageSettings, LanguageServerBinaryStatus, LspAdapterDelegate, @@ -209,8 +209,8 @@ impl nodejs::Host for WasmState { #[async_trait] impl lsp::Host for WasmState {} -impl From for github::GithubRelease { - fn from(value: http::github::GithubRelease) -> Self { +impl From<::http_client::github::GithubRelease> for github::GithubRelease { + fn from(value: ::http_client::github::GithubRelease) -> Self { Self { version: value.tag_name, assets: value.assets.into_iter().map(Into::into).collect(), @@ -218,8 +218,8 @@ impl From for github::GithubRelease { } } -impl From for github::GithubReleaseAsset { - fn from(value: http::github::GithubReleaseAsset) -> Self { +impl From<::http_client::github::GithubReleaseAsset> for github::GithubReleaseAsset { + fn from(value: ::http_client::github::GithubReleaseAsset) -> Self { Self { name: value.name, download_url: value.browser_download_url, @@ -235,7 +235,7 @@ impl github::Host for WasmState { options: github::GithubReleaseOptions, ) -> wasmtime::Result> { maybe!(async { - let release = http::github::latest_github_release( + let release = ::http_client::github::latest_github_release( &repo, options.require_assets, options.pre_release, @@ -254,9 +254,12 @@ impl github::Host for WasmState { tag: String, ) -> wasmtime::Result> { maybe!(async { - let release = - http::github::get_release_by_tag_name(&repo, &tag, self.host.http_client.clone()) - .await?; + let release = ::http_client::github::get_release_by_tag_name( + &repo, + &tag, + self.host.http_client.clone(), + ) + .await?; Ok(release.into()) }) .await diff --git a/crates/extension_cli/Cargo.toml b/crates/extension_cli/Cargo.toml index 6beb8f3408c2387f78d51d7ab882a8830fa6ec7c..54c47f4a829af6352fa789d3493963c98acb9b13 100644 --- a/crates/extension_cli/Cargo.toml +++ b/crates/extension_cli/Cargo.toml @@ -18,7 +18,7 @@ clap = { workspace = true, features = ["derive"] } env_logger.workspace = true extension = { workspace = true, features = ["no-webrtc"] } fs.workspace = true -http.workspace = true +http_client.workspace = true language.workspace = true log.workspace = true rpc.workspace = true diff --git a/crates/extension_cli/src/main.rs b/crates/extension_cli/src/main.rs index 11b79b8677cdfdc51eb766d003060bcb3467f3cd..71bf095b1bd9fcf072df6d06a8a230e13fb75176 100644 --- a/crates/extension_cli/src/main.rs +++ b/crates/extension_cli/src/main.rs @@ -7,13 +7,13 @@ use std::{ }; use ::fs::{copy_recursive, CopyOptions, Fs, RealFs}; +use ::http_client::HttpClientWithProxy; use anyhow::{anyhow, bail, Context, Result}; use clap::Parser; use extension::{ extension_builder::{CompileExtensionOptions, ExtensionBuilder}, ExtensionManifest, }; -use http::HttpClientWithProxy; use language::LanguageConfig; use theme::ThemeRegistry; use tree_sitter::{Language, Query, WasmStore}; diff --git a/crates/feedback/Cargo.toml b/crates/feedback/Cargo.toml index d6d46a5fb626018a57c0793a789e33d4fae4cafa..83c726e3e9ab4a37bd5821879a929743789b0246 100644 --- a/crates/feedback/Cargo.toml +++ b/crates/feedback/Cargo.toml @@ -24,7 +24,7 @@ futures.workspace = true gpui.workspace = true human_bytes = "0.4.1" isahc.workspace = true -http.workspace = true +http_client.workspace = true language.workspace = true log.workspace = true menu.workspace = true diff --git a/crates/feedback/src/feedback_modal.rs b/crates/feedback/src/feedback_modal.rs index d59dac069787e5c9ad649ef3bb741204d138a355..370d8b73c42e4db3dc046cff244d7ac6012ed96f 100644 --- a/crates/feedback/src/feedback_modal.rs +++ b/crates/feedback/src/feedback_modal.rs @@ -10,7 +10,7 @@ use gpui::{ div, rems, AppContext, DismissEvent, EventEmitter, FocusHandle, FocusableView, Model, PromptLevel, Render, Task, View, ViewContext, }; -use http::HttpClient; +use http_client::HttpClient; use isahc::Request; use language::Buffer; use project::Project; diff --git a/crates/git/Cargo.toml b/crates/git/Cargo.toml index e281c580acf9158540af691538f6e10368f62818..6c606dd2db4deaab56fff9e3678b83dec6c110c0 100644 --- a/crates/git/Cargo.toml +++ b/crates/git/Cargo.toml @@ -19,7 +19,7 @@ collections.workspace = true derive_more.workspace = true git2.workspace = true gpui.workspace = true -http.workspace = true +http_client.workspace = true lazy_static.workspace = true log.workspace = true parking_lot.workspace = true diff --git a/crates/git/src/hosting_provider.rs b/crates/git/src/hosting_provider.rs index e373190b5c34dd710dfbc4dbaa952cf55a2e5577..7be132a67e415b13692aa24e1cabc9c475fd3dfc 100644 --- a/crates/git/src/hosting_provider.rs +++ b/crates/git/src/hosting_provider.rs @@ -5,7 +5,7 @@ use async_trait::async_trait; use collections::BTreeMap; use derive_more::{Deref, DerefMut}; use gpui::{AppContext, Global}; -use http::HttpClient; +use http_client::HttpClient; use parking_lot::RwLock; use url::Url; diff --git a/crates/git_hosting_providers/Cargo.toml b/crates/git_hosting_providers/Cargo.toml index 833393099c50a7bfcbb9b31bc6f63b29ae337968..caca91c1ab93d6ffb2c2b1232793dbaabacf3418 100644 --- a/crates/git_hosting_providers/Cargo.toml +++ b/crates/git_hosting_providers/Cargo.toml @@ -17,7 +17,7 @@ async-trait.workspace = true futures.workspace = true git.workspace = true gpui.workspace = true -http.workspace = true +http_client.workspace = true isahc.workspace = true regex.workspace = true serde.workspace = true diff --git a/crates/git_hosting_providers/src/providers/codeberg.rs b/crates/git_hosting_providers/src/providers/codeberg.rs index 4f9ada226edbdb28b985051d449707b2dac63edd..b34d809100be56c6346140438b9dd068d6e1b279 100644 --- a/crates/git_hosting_providers/src/providers/codeberg.rs +++ b/crates/git_hosting_providers/src/providers/codeberg.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use anyhow::{bail, Context, Result}; use async_trait::async_trait; use futures::AsyncReadExt; -use http::HttpClient; +use http_client::HttpClient; use isahc::config::Configurable; use isahc::{AsyncBody, Request}; use serde::Deserialize; diff --git a/crates/git_hosting_providers/src/providers/github.rs b/crates/git_hosting_providers/src/providers/github.rs index f27fc9e0a745eb83351fc47df3d579909e63aeb1..103f6ae1ce734c3cf805cd4df50724499fe4ff1f 100644 --- a/crates/git_hosting_providers/src/providers/github.rs +++ b/crates/git_hosting_providers/src/providers/github.rs @@ -3,7 +3,7 @@ use std::sync::{Arc, OnceLock}; use anyhow::{bail, Context, Result}; use async_trait::async_trait; use futures::AsyncReadExt; -use http::HttpClient; +use http_client::HttpClient; use isahc::config::Configurable; use isahc::{AsyncBody, Request}; use regex::Regex; diff --git a/crates/google_ai/Cargo.toml b/crates/google_ai/Cargo.toml index 86f0d13b9abb59f4a7700f7ed15681b55c87d7fe..9fecd8f708da5bbb3fc9d62340aefeafe1e93161 100644 --- a/crates/google_ai/Cargo.toml +++ b/crates/google_ai/Cargo.toml @@ -11,6 +11,6 @@ path = "src/google_ai.rs" [dependencies] anyhow.workspace = true futures.workspace = true -http.workspace = true +http_client.workspace = true serde.workspace = true serde_json.workspace = true diff --git a/crates/google_ai/src/google_ai.rs b/crates/google_ai/src/google_ai.rs index 6a9b37cb43efa1f13b24a557667866eec7cbfa11..34c43176d0a218f71bf0dfc319350f8f38c5bdf3 100644 --- a/crates/google_ai/src/google_ai.rs +++ b/crates/google_ai/src/google_ai.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use anyhow::{anyhow, Result}; use futures::{io::BufReader, stream::BoxStream, AsyncBufReadExt, AsyncReadExt, StreamExt}; -use http::HttpClient; +use http_client::HttpClient; use serde::{Deserialize, Serialize}; pub const API_URL: &str = "https://generativelanguage.googleapis.com"; diff --git a/crates/gpui/Cargo.toml b/crates/gpui/Cargo.toml index 429e74509be5c6f3278059fae2b9788ed831d3ab..049acded99967d2bda7919716908218896a4ac78 100644 --- a/crates/gpui/Cargo.toml +++ b/crates/gpui/Cargo.toml @@ -16,7 +16,7 @@ test-support = [ "backtrace", "collections/test-support", "util/test-support", - "http/test-support", + "http_client/test-support", ] runtime_shaders = [] macos-blade = ["blade-graphics", "blade-macros", "blade-util", "bytemuck"] @@ -41,7 +41,7 @@ etagere = "0.2" futures.workspace = true font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "40391b7" } gpui_macros.workspace = true -http.workspace = true +http_client.workspace = true image = "0.25.1" itertools.workspace = true lazy_static.workspace = true @@ -79,7 +79,7 @@ waker-fn = "1.1.0" backtrace = "0.3" collections = { workspace = true, features = ["test-support"] } util = { workspace = true, features = ["test-support"] } -http = { workspace = true, features = ["test-support"] } +http_client = { workspace = true, features = ["test-support"] } unicode-segmentation.workspace = true [build-dependencies] diff --git a/crates/gpui/src/app.rs b/crates/gpui/src/app.rs index 4dde1f8f10dc26467f8da8deec9d2a2143de19e6..627c76572a6e54534f8c7092a8eff88464b5df4c 100644 --- a/crates/gpui/src/app.rs +++ b/crates/gpui/src/app.rs @@ -18,7 +18,7 @@ use smol::future::FutureExt; pub use async_context::*; use collections::{FxHashMap, FxHashSet, VecDeque}; pub use entity_map::*; -use http::{self, HttpClient}; +use http_client::HttpClient; pub use model_context::*; #[cfg(any(test, feature = "test-support"))] pub use test_context::*; @@ -114,7 +114,7 @@ impl App { Self(AppContext::new( current_platform(false), Arc::new(()), - http::client(None), + http_client::client(None), )) } @@ -125,7 +125,7 @@ impl App { Self(AppContext::new( current_platform(true), Arc::new(()), - http::client(None), + http_client::client(None), )) } diff --git a/crates/gpui/src/app/test_context.rs b/crates/gpui/src/app/test_context.rs index 944a95501df47182bf42687e05a625fc56a802b1..95f0698855e126012e3a2b2c5f3eccd3b31f9c0b 100644 --- a/crates/gpui/src/app/test_context.rs +++ b/crates/gpui/src/app/test_context.rs @@ -104,7 +104,7 @@ impl TestAppContext { let foreground_executor = ForegroundExecutor::new(arc_dispatcher); let platform = TestPlatform::new(background_executor.clone(), foreground_executor.clone()); let asset_source = Arc::new(()); - let http_client = http::FakeHttpClient::with_404_response(); + let http_client = http_client::FakeHttpClient::with_404_response(); let text_system = Arc::new(TextSystem::new(platform.text_system())); Self { diff --git a/crates/gpui/src/elements/img.rs b/crates/gpui/src/elements/img.rs index 916a83df91badc3ded68024d5170ffd0e11144cf..c47ed69ac075b736cd6c746ef65a75ae36fd1202 100644 --- a/crates/gpui/src/elements/img.rs +++ b/crates/gpui/src/elements/img.rs @@ -13,7 +13,7 @@ use image::{ImageBuffer, ImageError}; #[cfg(target_os = "macos")] use media::core_video::CVImageBuffer; -use http; +use http_client; use thiserror::Error; use util::ResultExt; @@ -413,7 +413,7 @@ impl Asset for Image { pub enum ImageCacheError { /// An error that occurred while fetching an image from a remote source. #[error("http error: {0}")] - Client(#[from] http::Error), + Client(#[from] http_client::Error), /// An error that occurred while reading the image from disk. #[error("IO error: {0}")] Io(Arc), @@ -423,7 +423,7 @@ pub enum ImageCacheError { /// The URI of the image. uri: SharedUri, /// The HTTP status code. - status: http::StatusCode, + status: http_client::StatusCode, /// The HTTP response body. body: String, }, diff --git a/crates/gpui/src/platform/linux/wayland/client.rs b/crates/gpui/src/platform/linux/wayland/client.rs index c88f0ff7612d56333bbc678c1c117530f2a47ee2..c97fe24f3960f331fd44bc45afe27b8ef52b6382 100644 --- a/crates/gpui/src/platform/linux/wayland/client.rs +++ b/crates/gpui/src/platform/linux/wayland/client.rs @@ -11,7 +11,7 @@ use calloop_wayland_source::WaylandSource; use collections::HashMap; use filedescriptor::Pipe; -use http::Url; +use http_client::Url; use smallvec::SmallVec; use util::ResultExt; use wayland_backend::client::ObjectId; diff --git a/crates/http/Cargo.toml b/crates/http_client/Cargo.toml similarity index 86% rename from crates/http/Cargo.toml rename to crates/http_client/Cargo.toml index 41a12084eb0cb8d52a3bee97a4600bd1cdec98d4..ae017685a9471a06611710f86341104e54a71ae5 100644 --- a/crates/http/Cargo.toml +++ b/crates/http_client/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "http" +name = "http_client" version = "0.1.0" edition = "2021" publish = false @@ -12,10 +12,11 @@ workspace = true test-support = [] [lib] -path = "src/http.rs" +path = "src/http_client.rs" doctest = true [dependencies] +http = "1.0.0" anyhow.workspace = true derive_more.workspace = true futures.workspace = true diff --git a/crates/http/LICENSE-APACHE b/crates/http_client/LICENSE-APACHE similarity index 100% rename from crates/http/LICENSE-APACHE rename to crates/http_client/LICENSE-APACHE diff --git a/crates/http/src/github.rs b/crates/http_client/src/github.rs similarity index 100% rename from crates/http/src/github.rs rename to crates/http_client/src/github.rs diff --git a/crates/http/src/http.rs b/crates/http_client/src/http_client.rs similarity index 100% rename from crates/http/src/http.rs rename to crates/http_client/src/http_client.rs diff --git a/crates/indexed_docs/Cargo.toml b/crates/indexed_docs/Cargo.toml index e1609116d11e817b47d84a68bffd03f4be7b90b4..2c71484e7fb3d8d2bdda1a8d7867357909a71fc5 100644 --- a/crates/indexed_docs/Cargo.toml +++ b/crates/indexed_docs/Cargo.toml @@ -22,7 +22,7 @@ fuzzy.workspace = true gpui.workspace = true heed.workspace = true html_to_markdown.workspace = true -http.workspace = true +http_client.workspace = true indexmap.workspace = true parking_lot.workspace = true paths.workspace = true diff --git a/crates/indexed_docs/src/providers/rustdoc.rs b/crates/indexed_docs/src/providers/rustdoc.rs index 9509725a1a3f986dbc9bc8b689d655fecd9878f2..4e27792e79272c62a016d752e6e015d3e82c20f8 100644 --- a/crates/indexed_docs/src/providers/rustdoc.rs +++ b/crates/indexed_docs/src/providers/rustdoc.rs @@ -13,7 +13,7 @@ use async_trait::async_trait; use collections::{HashSet, VecDeque}; use fs::Fs; use futures::{AsyncReadExt, FutureExt}; -use http::{AsyncBody, HttpClient, HttpClientWithUrl}; +use http_client::{AsyncBody, HttpClient, HttpClientWithUrl}; use crate::{IndexedDocsDatabase, IndexedDocsProvider, PackageName, ProviderId}; diff --git a/crates/language/Cargo.toml b/crates/language/Cargo.toml index a9b9394d18fd0a20ddbadf79f45d2508547ca3c6..9e156840526ab658a79075882aa8ac834e3e0f7f 100644 --- a/crates/language/Cargo.toml +++ b/crates/language/Cargo.toml @@ -35,7 +35,7 @@ fuzzy.workspace = true git.workspace = true globset.workspace = true gpui.workspace = true -http.workspace = true +http_client.workspace = true itertools.workspace = true lazy_static.workspace = true log.workspace = true @@ -84,4 +84,4 @@ tree-sitter-rust.workspace = true tree-sitter-typescript.workspace = true unindent.workspace = true util = { workspace = true, features = ["test-support"] } -http = { workspace = true, features = ["test-support"] } +http_client = { workspace = true, features = ["test-support"] } diff --git a/crates/language/src/language.rs b/crates/language/src/language.rs index 7b2e4916f3dafd9d27c862ebc9c9c3f2c65bbfad..c07090fd956bd8db7f4bef8974d5d027e452d3cc 100644 --- a/crates/language/src/language.rs +++ b/crates/language/src/language.rs @@ -27,7 +27,7 @@ use collections::{HashMap, HashSet}; use futures::Future; use gpui::{AppContext, AsyncAppContext, Model, SharedString, Task}; pub use highlight_map::HighlightMap; -use http::HttpClient; +use http_client::HttpClient; use lazy_static::lazy_static; use lsp::{CodeActionKind, LanguageServerBinary}; use parking_lot::Mutex; diff --git a/crates/language_model/Cargo.toml b/crates/language_model/Cargo.toml index 132467612067531838df8312027269de6ea1ddbc..1a099897a359a04b284f519d1b0518c6ba522a5f 100644 --- a/crates/language_model/Cargo.toml +++ b/crates/language_model/Cargo.toml @@ -29,7 +29,7 @@ editor.workspace = true feature_flags.workspace = true futures.workspace = true gpui.workspace = true -http.workspace = true +http_client.workspace = true menu.workspace = true ollama = { workspace = true, features = ["schemars"] } open_ai = { workspace = true, features = ["schemars"] } diff --git a/crates/language_model/src/provider/anthropic.rs b/crates/language_model/src/provider/anthropic.rs index facdfb21acc3c1be214cb7f1a05bcd59b19cd7d7..620c99017bd211a104a4164954a5e418fdc90cc4 100644 --- a/crates/language_model/src/provider/anthropic.rs +++ b/crates/language_model/src/provider/anthropic.rs @@ -7,7 +7,7 @@ use gpui::{ AnyView, AppContext, AsyncAppContext, FontStyle, Subscription, Task, TextStyle, View, WhiteSpace, }; -use http::HttpClient; +use http_client::HttpClient; use settings::{Settings, SettingsStore}; use std::{sync::Arc, time::Duration}; use strum::IntoEnumIterator; diff --git a/crates/language_model/src/provider/fake.rs b/crates/language_model/src/provider/fake.rs index bcd46a6fdd7030fdb67ca347352ff65d3607f672..81261bbe64d479cbf7b48c2759e6eb0069f3d69e 100644 --- a/crates/language_model/src/provider/fake.rs +++ b/crates/language_model/src/provider/fake.rs @@ -8,7 +8,7 @@ use crate::{ LanguageModelProviderName, LanguageModelProviderState, LanguageModelRequest, }; use gpui::{AnyView, AppContext, AsyncAppContext, Task}; -use http::Result; +use http_client::Result; use ui::WindowContext; pub fn language_model_id() -> LanguageModelId { diff --git a/crates/language_model/src/provider/ollama.rs b/crates/language_model/src/provider/ollama.rs index 47a3c3731d84e8baa89bdac44a56971df6c04a25..4dd0f4dcb15fa7de457363c221daf80ca2c704b4 100644 --- a/crates/language_model/src/provider/ollama.rs +++ b/crates/language_model/src/provider/ollama.rs @@ -1,7 +1,7 @@ use anyhow::{anyhow, Result}; use futures::{future::BoxFuture, stream::BoxStream, FutureExt, StreamExt}; use gpui::{AnyView, AppContext, AsyncAppContext, ModelContext, Subscription, Task}; -use http::HttpClient; +use http_client::HttpClient; use ollama::{get_models, stream_chat_completion, ChatMessage, ChatOptions, ChatRequest}; use settings::{Settings, SettingsStore}; use std::{sync::Arc, time::Duration}; diff --git a/crates/language_model/src/provider/open_ai.rs b/crates/language_model/src/provider/open_ai.rs index b82df4ca48000349ceebdea7178e6b488bc5ef3d..8135f4e9416de750e50d24540869f5b136c5b82a 100644 --- a/crates/language_model/src/provider/open_ai.rs +++ b/crates/language_model/src/provider/open_ai.rs @@ -6,7 +6,7 @@ use gpui::{ AnyView, AppContext, AsyncAppContext, FontStyle, Subscription, Task, TextStyle, View, WhiteSpace, }; -use http::HttpClient; +use http_client::HttpClient; use open_ai::{stream_completion, Request, RequestMessage}; use settings::{Settings, SettingsStore}; use std::{sync::Arc, time::Duration}; diff --git a/crates/languages/Cargo.toml b/crates/languages/Cargo.toml index 502440e10caf9a8956474f25cac240d33ed1a3b6..f1ecaf8d61d541dfc1b41b5cb01c010fdbc798dd 100644 --- a/crates/languages/Cargo.toml +++ b/crates/languages/Cargo.toml @@ -20,7 +20,7 @@ collections.workspace = true feature_flags.workspace = true futures.workspace = true gpui.workspace = true -http.workspace = true +http_client.workspace = true language.workspace = true lazy_static.workspace = true log.workspace = true diff --git a/crates/languages/src/c.rs b/crates/languages/src/c.rs index cc70435c57014888158dcf058bbf8bebcf08f801..ea11b4e0d0bc34303b856a8b76aafd435df14ab3 100644 --- a/crates/languages/src/c.rs +++ b/crates/languages/src/c.rs @@ -2,7 +2,7 @@ use anyhow::{anyhow, bail, Context, Result}; use async_trait::async_trait; use futures::StreamExt; use gpui::AsyncAppContext; -use http::github::{latest_github_release, GitHubLspBinaryVersion}; +use http_client::github::{latest_github_release, GitHubLspBinaryVersion}; pub use language::*; use lsp::LanguageServerBinary; use project::project_settings::{BinarySettings, ProjectSettings}; diff --git a/crates/languages/src/go.rs b/crates/languages/src/go.rs index 08c4a40ad93be6282fe90e2bc1d424b45dd1d5f2..5587bf652e64068ec0e6ba104cb6726fa3d0c63c 100644 --- a/crates/languages/src/go.rs +++ b/crates/languages/src/go.rs @@ -2,7 +2,7 @@ use anyhow::{anyhow, Context, Result}; use async_trait::async_trait; use futures::StreamExt; use gpui::{AppContext, AsyncAppContext, Task}; -use http::github::latest_github_release; +use http_client::github::latest_github_release; pub use language::*; use lazy_static::lazy_static; use lsp::LanguageServerBinary; diff --git a/crates/languages/src/json.rs b/crates/languages/src/json.rs index 9890936dba2e2f38741f4442b608936180ebac66..cec63874af65823be1d65d786aa9ab59c4eca2f5 100644 --- a/crates/languages/src/json.rs +++ b/crates/languages/src/json.rs @@ -6,7 +6,7 @@ use collections::HashMap; use feature_flags::FeatureFlagAppExt; use futures::StreamExt; use gpui::{AppContext, AsyncAppContext}; -use http::github::{latest_github_release, GitHubLspBinaryVersion}; +use http_client::github::{latest_github_release, GitHubLspBinaryVersion}; use language::{LanguageRegistry, LanguageServerName, LspAdapter, LspAdapterDelegate}; use lsp::LanguageServerBinary; use node_runtime::NodeRuntime; diff --git a/crates/languages/src/rust.rs b/crates/languages/src/rust.rs index 5fb4f8046fa3461fce46174fb9e94561c36ace10..ebf1d0d0e31e4efce0132936aa79c74dcd80d8dd 100644 --- a/crates/languages/src/rust.rs +++ b/crates/languages/src/rust.rs @@ -3,7 +3,7 @@ use async_compression::futures::bufread::GzipDecoder; use async_trait::async_trait; use futures::{io::BufReader, StreamExt}; use gpui::{AppContext, AsyncAppContext}; -use http::github::{latest_github_release, GitHubLspBinaryVersion}; +use http_client::github::{latest_github_release, GitHubLspBinaryVersion}; pub use language::*; use language_settings::all_language_settings; use lazy_static::lazy_static; diff --git a/crates/languages/src/typescript.rs b/crates/languages/src/typescript.rs index 6be2d5d82df1310bd061b790a33feeed94a101b7..0f6b2bfec802ff4334a8e7622848578421a68cb2 100644 --- a/crates/languages/src/typescript.rs +++ b/crates/languages/src/typescript.rs @@ -4,7 +4,7 @@ use async_tar::Archive; use async_trait::async_trait; use collections::HashMap; use gpui::AsyncAppContext; -use http::github::{build_tarball_url, GitHubLspBinaryVersion}; +use http_client::github::{build_tarball_url, GitHubLspBinaryVersion}; use language::{LanguageServerName, LspAdapter, LspAdapterDelegate}; use lsp::{CodeActionKind, LanguageServerBinary}; use node_runtime::NodeRuntime; diff --git a/crates/node_runtime/Cargo.toml b/crates/node_runtime/Cargo.toml index aee792f0186ad2ea6fb4179bfd023fb198680088..b7aee583360cba4d6794c2a8e5faa0e092b20ad1 100644 --- a/crates/node_runtime/Cargo.toml +++ b/crates/node_runtime/Cargo.toml @@ -22,7 +22,7 @@ async-tar.workspace = true async-trait.workspace = true async_zip.workspace = true futures.workspace = true -http.workspace = true +http_client.workspace = true log.workspace = true paths.workspace = true semver.workspace = true diff --git a/crates/node_runtime/src/node_runtime.rs b/crates/node_runtime/src/node_runtime.rs index 5b543b81e3fa41e00605a10ca2cb78ae4cf721dc..58c3f8f6737edfa99e56e170d4ffa2d2614df2a4 100644 --- a/crates/node_runtime/src/node_runtime.rs +++ b/crates/node_runtime/src/node_runtime.rs @@ -5,7 +5,7 @@ pub use archive::extract_zip; use async_compression::futures::bufread::GzipDecoder; use async_tar::Archive; use futures::AsyncReadExt; -use http::HttpClient; +use http_client::HttpClient; use semver::Version; use serde::Deserialize; use smol::io::BufReader; diff --git a/crates/ollama/Cargo.toml b/crates/ollama/Cargo.toml index c0ee5498eee78c361508dfd126fa5a40848e8401..76a8b1a8c16cfc03cfc4ff29748c4484dcb40a36 100644 --- a/crates/ollama/Cargo.toml +++ b/crates/ollama/Cargo.toml @@ -18,7 +18,7 @@ schemars = ["dep:schemars"] [dependencies] anyhow.workspace = true futures.workspace = true -http.workspace = true +http_client.workspace = true isahc.workspace = true schemars = { workspace = true, optional = true } serde.workspace = true diff --git a/crates/ollama/src/ollama.rs b/crates/ollama/src/ollama.rs index d2dfd2155db3d7b671ebd0e0476f815f3475bf44..269698ebab06b1b38ea3726ea34644502495e632 100644 --- a/crates/ollama/src/ollama.rs +++ b/crates/ollama/src/ollama.rs @@ -1,6 +1,6 @@ use anyhow::{anyhow, Context, Result}; use futures::{io::BufReader, stream::BoxStream, AsyncBufReadExt, AsyncReadExt, StreamExt}; -use http::{AsyncBody, HttpClient, Method, Request as HttpRequest}; +use http_client::{AsyncBody, HttpClient, Method, Request as HttpRequest}; use isahc::config::Configurable; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; diff --git a/crates/open_ai/Cargo.toml b/crates/open_ai/Cargo.toml index eae3a306a70202118c878b24fb4eaea3e31c8c1d..76ba7c4b502350b694dd934418cdd803c58a1752 100644 --- a/crates/open_ai/Cargo.toml +++ b/crates/open_ai/Cargo.toml @@ -15,7 +15,7 @@ schemars = ["dep:schemars"] [dependencies] anyhow.workspace = true futures.workspace = true -http.workspace = true +http_client.workspace = true isahc.workspace = true schemars = { workspace = true, optional = true } serde.workspace = true diff --git a/crates/open_ai/src/open_ai.rs b/crates/open_ai/src/open_ai.rs index 56d934c5b08473351daa0c404ee76fc3bf17f12a..dfcd6646d14cf5068234e9e3f70599c9d115f367 100644 --- a/crates/open_ai/src/open_ai.rs +++ b/crates/open_ai/src/open_ai.rs @@ -1,6 +1,6 @@ use anyhow::{anyhow, Context, Result}; use futures::{io::BufReader, stream::BoxStream, AsyncBufReadExt, AsyncReadExt, StreamExt}; -use http::{AsyncBody, HttpClient, Method, Request as HttpRequest}; +use http_client::{AsyncBody, HttpClient, Method, Request as HttpRequest}; use isahc::config::Configurable; use serde::{Deserialize, Serialize}; use serde_json::{Map, Value}; diff --git a/crates/project/Cargo.toml b/crates/project/Cargo.toml index 43cc001bf3fe378b345f0ba32b5c385fe243f5fd..ff5fd693f21af59099c583ed5f1213f9f764dbba 100644 --- a/crates/project/Cargo.toml +++ b/crates/project/Cargo.toml @@ -37,7 +37,7 @@ fuzzy.workspace = true git.workspace = true globset.workspace = true gpui.workspace = true -http.workspace = true +http_client.workspace = true itertools.workspace = true language.workspace = true log.workspace = true diff --git a/crates/project/src/project.rs b/crates/project/src/project.rs index 62a4030f34f9635f7f7a0b9342432edefdd94cd9..37b7e01b25838a830b5d0f2f642edde3f8eb2a00 100644 --- a/crates/project/src/project.rs +++ b/crates/project/src/project.rs @@ -39,7 +39,7 @@ use gpui::{ AnyModel, AppContext, AsyncAppContext, BackgroundExecutor, BorrowAppContext, Context, Entity, EventEmitter, Model, ModelContext, PromptLevel, SharedString, Task, WeakModel, WindowContext, }; -use http::{HttpClient, Url}; +use http_client::{HttpClient, Url}; use itertools::Itertools; use language::{ language_settings::{ @@ -1120,7 +1120,7 @@ impl Project { let fs = Arc::new(RealFs::default()); let languages = LanguageRegistry::test(cx.background_executor().clone()); let clock = Arc::new(FakeSystemClock::default()); - let http_client = http::FakeHttpClient::with_404_response(); + let http_client = http_client::FakeHttpClient::with_404_response(); let client = cx .update(|cx| client::Client::new(clock, http_client.clone(), cx)) .unwrap(); @@ -1164,7 +1164,7 @@ impl Project { let languages = LanguageRegistry::test(cx.executor()); let clock = Arc::new(FakeSystemClock::default()); - let http_client = http::FakeHttpClient::with_404_response(); + let http_client = http_client::FakeHttpClient::with_404_response(); let client = cx.update(|cx| client::Client::new(clock, http_client.clone(), cx)); let user_store = cx.new_model(|cx| UserStore::new(client.clone(), cx)); let project = cx.update(|cx| { diff --git a/crates/remote_server/Cargo.toml b/crates/remote_server/Cargo.toml index 1176a65ba49936ff55958038c4b8f72b6dc0a15c..ce38197b5f7d48fe163a9c8f55f6401d90d7d027 100644 --- a/crates/remote_server/Cargo.toml +++ b/crates/remote_server/Cargo.toml @@ -42,7 +42,7 @@ client = { workspace = true, features = ["test-support"] } clock = { workspace = true, features = ["test-support"] } fs = { workspace = true, features = ["test-support"] } gpui = { workspace = true, features = ["test-support"] } -http = { workspace = true, features = ["test-support"] } +http_client = { workspace = true, features = ["test-support"] } language = { workspace = true, features = ["test-support"] } node_runtime = { workspace = true, features = ["test-support"] } remote = { workspace = true, features = ["test-support"] } diff --git a/crates/remote_server/src/remote_editing_tests.rs b/crates/remote_server/src/remote_editing_tests.rs index 15589261ec98deb3bd754edb8ef864d019b8a540..c166ff650afa604ecc04273a0b28b4b164b502b6 100644 --- a/crates/remote_server/src/remote_editing_tests.rs +++ b/crates/remote_server/src/remote_editing_tests.rs @@ -3,7 +3,7 @@ use client::{Client, UserStore}; use clock::FakeSystemClock; use fs::{FakeFs, Fs as _}; use gpui::{Context, Model, TestAppContext}; -use http::FakeHttpClient; +use http_client::FakeHttpClient; use language::LanguageRegistry; use node_runtime::FakeNodeRuntime; use project::Project; diff --git a/crates/repl/Cargo.toml b/crates/repl/Cargo.toml index a1f74d27dcef241e7685723655cd5d721f708a50..0c98ddc2a75657754b388fb93d8a1dda528dcb77 100644 --- a/crates/repl/Cargo.toml +++ b/crates/repl/Cargo.toml @@ -44,7 +44,7 @@ workspace.workspace = true editor = { workspace = true, features = ["test-support"] } env_logger.workspace = true gpui = { workspace = true, features = ["test-support"] } -http = { workspace = true, features = ["test-support"] } +http_client = { workspace = true, features = ["test-support"] } language = { workspace = true, features = ["test-support"] } project = { workspace = true, features = ["test-support"] } settings = { workspace = true, features = ["test-support"] } diff --git a/crates/rpc/Cargo.toml b/crates/rpc/Cargo.toml index 1872eaebf15dfdadccbe6e1fddd8d1c355f7b957..b5f21206cfe36d2ffe525ba2d018ab61ce83426a 100644 --- a/crates/rpc/Cargo.toml +++ b/crates/rpc/Cargo.toml @@ -18,7 +18,7 @@ test-support = ["collections/test-support", "gpui/test-support", "proto/test-sup [dependencies] anyhow.workspace = true -async-tungstenite = "0.23" +async-tungstenite.workspace = true base64.workspace = true chrono.workspace = true collections.workspace = true diff --git a/crates/semantic_index/Cargo.toml b/crates/semantic_index/Cargo.toml index 19cb0c96fee452bdc7cf9f62e3b22beea3350fd0..6dc12b040c76ae87a178d03611d5cf56ad8a17c7 100644 --- a/crates/semantic_index/Cargo.toml +++ b/crates/semantic_index/Cargo.toml @@ -30,7 +30,7 @@ gpui.workspace = true language.workspace = true log.workspace = true heed.workspace = true -http.workspace = true +http_client.workspace = true open_ai.workspace = true parking_lot.workspace = true project.workspace = true @@ -60,4 +60,4 @@ tempfile.workspace = true util = { workspace = true, features = ["test-support"] } worktree = { workspace = true, features = ["test-support"] } workspace = { workspace = true, features = ["test-support"] } -http = { workspace = true, features = ["test-support"] } +http_client = { workspace = true, features = ["test-support"] } diff --git a/crates/semantic_index/examples/index.rs b/crates/semantic_index/examples/index.rs index f994952d8192c63341def09ee03179a850e6147c..cc09375167026b8e28a02eea7162040e55895157 100644 --- a/crates/semantic_index/examples/index.rs +++ b/crates/semantic_index/examples/index.rs @@ -1,7 +1,7 @@ use client::Client; use futures::channel::oneshot; use gpui::App; -use http::HttpClientWithUrl; +use http_client::HttpClientWithUrl; use language::language_settings::AllLanguageSettings; use project::Project; use semantic_index::{OpenAiEmbeddingModel, OpenAiEmbeddingProvider, SemanticIndex}; diff --git a/crates/semantic_index/src/embedding/ollama.rs b/crates/semantic_index/src/embedding/ollama.rs index aef6780cfe8f8674d3a41d93c2f1c57c25814474..5c875ddaa67dc7dc90f3e0d0d65a694fe74caabf 100644 --- a/crates/semantic_index/src/embedding/ollama.rs +++ b/crates/semantic_index/src/embedding/ollama.rs @@ -1,6 +1,6 @@ use anyhow::{Context as _, Result}; use futures::{future::BoxFuture, AsyncReadExt, FutureExt}; -use http::HttpClient; +use http_client::HttpClient; use serde::{Deserialize, Serialize}; use std::sync::Arc; diff --git a/crates/semantic_index/src/embedding/open_ai.rs b/crates/semantic_index/src/embedding/open_ai.rs index ceceb4129f9e589246d819083c0f5643fd45b2f2..d07e7d6b534aba0ed18fc7cd46ee67b5b99c933b 100644 --- a/crates/semantic_index/src/embedding/open_ai.rs +++ b/crates/semantic_index/src/embedding/open_ai.rs @@ -1,7 +1,7 @@ use crate::{Embedding, EmbeddingProvider, TextToEmbed}; use anyhow::Result; use futures::{future::BoxFuture, FutureExt}; -use http::HttpClient; +use http_client::HttpClient; pub use open_ai::OpenAiEmbeddingModel; use std::sync::Arc; diff --git a/crates/supermaven/Cargo.toml b/crates/supermaven/Cargo.toml index b1a676349099a2b1fe4fc9ede7c8fad6365c0d59..af9d619a436476995129347fe183711c8a1d4d87 100644 --- a/crates/supermaven/Cargo.toml +++ b/crates/supermaven/Cargo.toml @@ -40,4 +40,4 @@ project = { workspace = true, features = ["test-support"] } settings = { workspace = true, features = ["test-support"] } theme = { workspace = true, features = ["test-support"] } util = { workspace = true, features = ["test-support"] } -http = { workspace = true, features = ["test-support"] } +http_client = { workspace = true, features = ["test-support"] } diff --git a/crates/supermaven_api/Cargo.toml b/crates/supermaven_api/Cargo.toml index d06e103f2c57dfb843f861dbe4634e21248c6bd2..72ae902006b3376ec924d606f1a1ea1f95e1bc32 100644 --- a/crates/supermaven_api/Cargo.toml +++ b/crates/supermaven_api/Cargo.toml @@ -15,7 +15,7 @@ doctest = false [dependencies] anyhow.workspace = true futures.workspace = true -http.workspace = true +http_client.workspace = true paths.workspace = true serde.workspace = true serde_json.workspace = true diff --git a/crates/supermaven_api/src/supermaven_api.rs b/crates/supermaven_api/src/supermaven_api.rs index 09f64b1215046e21860cecacccfd254169d7d6b3..b341c2c23caad4d8e9517ccb6e00ff4af46831df 100644 --- a/crates/supermaven_api/src/supermaven_api.rs +++ b/crates/supermaven_api/src/supermaven_api.rs @@ -1,7 +1,7 @@ use anyhow::{anyhow, Context, Result}; use futures::io::BufReader; use futures::{AsyncReadExt, Future}; -use http::{AsyncBody, HttpClient, Request as HttpRequest}; +use http_client::{AsyncBody, HttpClient, Request as HttpRequest}; use paths::supermaven_dir; use serde::{Deserialize, Serialize}; use smol::fs::{self, File}; diff --git a/crates/text/Cargo.toml b/crates/text/Cargo.toml index 3ac0a0bcd68aa386137240c47f65e91c191f69bb..655d8f8be42d8154c54bfb164edc281601d94c4e 100644 --- a/crates/text/Cargo.toml +++ b/crates/text/Cargo.toml @@ -37,4 +37,4 @@ env_logger.workspace = true gpui = { workspace = true, features = ["test-support"] } rand.workspace = true util = { workspace = true, features = ["test-support"] } -http = { workspace = true, features = ["test-support"] } +http_client = { workspace = true, features = ["test-support"] } diff --git a/crates/title_bar/Cargo.toml b/crates/title_bar/Cargo.toml index 919d738bd2b9f662ada846bc43c9c1a2f81f172f..6c453a62e314b60befeabbf6cda258f7795e7eca 100644 --- a/crates/title_bar/Cargo.toml +++ b/crates/title_bar/Cargo.toml @@ -21,7 +21,7 @@ test-support = [ "collections/test-support", "editor/test-support", "gpui/test-support", - "http/test-support", + "http_client/test-support", "project/test-support", "settings/test-support", "util/test-support", @@ -61,7 +61,7 @@ client = { workspace = true, features = ["test-support"] } collections = { workspace = true, features = ["test-support"] } editor = { workspace = true, features = ["test-support"] } gpui = { workspace = true, features = ["test-support"] } -http = { workspace = true, features = ["test-support"] } +http_client = { workspace = true, features = ["test-support"] } notifications = { workspace = true, features = ["test-support"] } pretty_assertions.workspace = true project = { workspace = true, features = ["test-support"] } diff --git a/crates/workspace/Cargo.toml b/crates/workspace/Cargo.toml index b2ab2b2ef7e156fcd331e82d3e19bc5914ea1d6e..c410846416a4aab1811e943a467d982898893b8d 100644 --- a/crates/workspace/Cargo.toml +++ b/crates/workspace/Cargo.toml @@ -17,7 +17,7 @@ no-webrtc = ["call/no-webrtc"] test-support = [ "call/test-support", "client/test-support", - "http/test-support", + "http_client/test-support", "db/test-support", "project/test-support", "session/test-support", @@ -40,7 +40,7 @@ derive_more.workspace = true fs.workspace = true futures.workspace = true gpui.workspace = true -http.workspace = true +http_client.workspace = true itertools.workspace = true language.workspace = true lazy_static.workspace = true @@ -73,4 +73,4 @@ gpui = { workspace = true, features = ["test-support"] } project = { workspace = true, features = ["test-support"] } session = { workspace = true, features = ["test-support"] } settings = { workspace = true, features = ["test-support"] } -http = { workspace = true, features = ["test-support"] } +http_client = { workspace = true, features = ["test-support"] } diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index fa5e7856db85aff223d9c92e7b9c29374aa90851..e6cbf22a6c138c6b69a2bb881df2e42e96de81ce 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -583,7 +583,7 @@ impl AppState { let fs = fs::FakeFs::new(cx.background_executor().clone()); let languages = Arc::new(LanguageRegistry::test(cx.background_executor().clone())); let clock = Arc::new(clock::FakeSystemClock::default()); - let http_client = http::FakeHttpClient::with_404_response(); + let http_client = http_client::FakeHttpClient::with_404_response(); let client = Client::new(clock, http_client.clone(), cx); let session = Session::test(); let user_store = cx.new_model(|cx| UserStore::new(client.clone(), cx)); diff --git a/crates/worktree/Cargo.toml b/crates/worktree/Cargo.toml index cbb353b9d36ee0dd3437737ec90350c72b69c511..2e8883203139a2aeb5f3c2b6af4654ae8ea03036 100644 --- a/crates/worktree/Cargo.toml +++ b/crates/worktree/Cargo.toml @@ -18,7 +18,7 @@ test-support = [ "settings/test-support", "text/test-support", "gpui/test-support", - "http/test-support", + "http_client/test-support", ] [dependencies] @@ -52,7 +52,7 @@ collections = { workspace = true, features = ["test-support"] } env_logger.workspace = true git2.workspace = true gpui = {workspace = true, features = ["test-support"]} -http.workspace = true +http_client.workspace = true rand.workspace = true settings = {workspace = true, features = ["test-support"]} pretty_assertions.workspace = true diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml index 8b1b7ebf1eaf3ce6783d1b8a4f34b41457555a99..668c0820cd5ee22ab2eaac640879f453943b1fc6 100644 --- a/crates/zed/Cargo.toml +++ b/crates/zed/Cargo.toml @@ -49,7 +49,7 @@ git_hosting_providers.workspace = true go_to_line.workspace = true gpui.workspace = true headless.workspace = true -http.workspace = true +http_client.workspace = true image_viewer.workspace = true inline_completion_button.workspace = true install_cli.workspace = true diff --git a/crates/zed/src/reliability.rs b/crates/zed/src/reliability.rs index 958e27e933396d5ffb7a1cfb0cfcc1ce938b08cb..c3747b8d7e5e330c15ce52f3bb13dd466f2c42fe 100644 --- a/crates/zed/src/reliability.rs +++ b/crates/zed/src/reliability.rs @@ -4,10 +4,10 @@ use chrono::Utc; use client::telemetry; use db::kvp::KEY_VALUE_STORE; use gpui::{AppContext, SemanticVersion}; -use http::Method; +use http_client::Method; use isahc::config::Configurable; -use http::{self, HttpClient, HttpClientWithUrl}; +use http_client::{self, HttpClient, HttpClientWithUrl}; use paths::{crashes_dir, crashes_retired_dir}; use release_channel::ReleaseChannel; use release_channel::RELEASE_CHANNEL; @@ -162,7 +162,7 @@ pub fn monitor_main_thread_hangs( use parking_lot::Mutex; - use http::Method; + use http_client::Method; use std::{ ffi::c_int, sync::{mpsc, OnceLock}, @@ -323,7 +323,7 @@ pub fn monitor_main_thread_hangs( continue; }; - let Ok(request) = http::Request::builder() + let Ok(request) = http_client::Request::builder() .method(Method::POST) .uri(url.as_ref()) .header("x-zed-checksum", checksum) @@ -416,7 +416,7 @@ async fn upload_previous_panics( continue; }; - let Ok(request) = http::Request::builder() + let Ok(request) = http_client::Request::builder() .method(Method::POST) .uri(panic_report_url.as_ref()) .header("x-zed-checksum", checksum) @@ -488,7 +488,7 @@ async fn upload_previous_crashes( .await .context("error reading crash file")?; - let mut request = http::Request::post(&crash_report_url.to_string()) + let mut request = http_client::Request::post(&crash_report_url.to_string()) .redirect_policy(isahc::config::RedirectPolicy::Follow) .header("Content-Type", "text/plain");