From 98cfbec51276bbd6caa48fd6d8942247df091c94 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 24 Mar 2024 09:29:32 +0100 Subject: [PATCH] fix: forward `curl` rustls feature from `gix-transport` to avoid `curl` in `gix`. (#1328) This removes the `curl` dependency just for configuring it, and removes a hazard which became evident with reqwest. --- Cargo.lock | 1 - gix-transport/Cargo.toml | 2 ++ gix/Cargo.toml | 6 +----- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3602c0db39..52878592a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1280,7 +1280,6 @@ version = "0.61.1" dependencies = [ "anyhow", "async-std", - "curl", "document-features", "gix-actor 0.31.1", "gix-archive", diff --git a/gix-transport/Cargo.toml b/gix-transport/Cargo.toml index 2232a21577..8b36faede0 100644 --- a/gix-transport/Cargo.toml +++ b/gix-transport/Cargo.toml @@ -30,6 +30,8 @@ http-client = [ ] ## Implies `http-client`, and adds support for the http and https transports using the Rust bindings for `libcurl`. http-client-curl = ["curl", "http-client"] +## Implies `http-client-curl` and enables `rustls` for creationg `https://` connections. +http-client-curl-rust-tls = ["http-client-curl", "curl/rustls"] ### Implies `http-client` and adds support for http and https transports using the blocking version of `reqwest`. http-client-reqwest = ["reqwest", "http-client"] ## Stacks with `blocking-http-transport-reqwest` and enables `https://` via the `rustls` crate. diff --git a/gix/Cargo.toml b/gix/Cargo.toml index a044afd84c..6a6a9a9b48 100644 --- a/gix/Cargo.toml +++ b/gix/Cargo.toml @@ -169,8 +169,7 @@ blocking-http-transport-curl = [ ## Stacks with `blocking-http-transport-curl` and also enables the `rustls` backend to avoid `openssl`. blocking-http-transport-curl-rustls = [ "blocking-http-transport-curl", - "dep:curl", - "curl?/rustls", + "gix-transport/http-client-curl-rust-tls", ] ## Stacks with `blocking-network-client` to provide support for HTTP/S using **reqwest**, and implies blocking networking as a whole, making the `https://` transport available. blocking-http-transport-reqwest = [ @@ -364,9 +363,6 @@ serde = { version = "1.0.114", optional = true, default-features = false, featur smallvec = "1.9.0" async-std = { version = "1.12.0", optional = true } -# Used for feature-configuration only. -curl = { workspace = true, optional = true } - ## For use in rev-parse, which provides searching commits by running a regex on their message. ## ## If disabled, the text will be search verbatim in any portion of the commit message, similar to