Closed link2xt closed 2 years ago
CI is broken, it tests cargo check --no-default-features --features h1-client,h1-client-rustls
Looks like this fixes https://github.com/http-rs/surf/issues/326
The CI needs to be adjusted to not try --features h1-client,h1-client-rustls
since those are mutually exclusive ...
@Fishrock123 I pushed a fix
Released 2.3.2 https://github.com/http-rs/surf/releases/tag/v2.3.2
Could it be that this change broke the h1-client-rustls
client?
I'm getting this error:
error[E0201]: duplicate definitions with name `set_tls_config`:
--> /Users/mathias/.cargo/registry/src/github.com-1ecc6299db9ec823/surf-2.3.2/src/config.rs:207:5
|
197 | / pub fn set_tls_config(
198 | | mut self,
199 | | tls_config: Option<std::sync::Arc<rustls_crate::ClientConfig>>,
200 | | ) -> Self {
201 | | self.http_config.tls_config = tls_config;
202 | | self
203 | | }
| |_____- previous definition of `set_tls_config` here
...
207 | / pub fn set_tls_config(
208 | | mut self,
209 | | tls_config: Option<std::sync::Arc<async_native_tls::TlsConnector>>,
210 | | ) -> Self {
211 | | self.http_config.tls_config = tls_config;
212 | | self
213 | | }
| |_____^ duplicate definition
With this Cargo.toml:
[target.'cfg(target_arch = "wasm32")'.dependencies]
surf = { version = "2", default-features = false, features = ["wasm-client"] }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
surf = { version = "2", default-features = false, features = ["h1-client-rustls"] }
Pinning the previous release fixes compilation:
[target.'cfg(target_arch = "wasm32")'.dependencies]
surf = { version = "=2.3.1", default-features = false, features = ["wasm-client"] }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
surf = { version = "=2.3.1", default-features = false, features = ["h1-client-rustls"] }
Unlikely in of itself but it may need extra cfg
checking in this area to prevent overlap in that case. feel free to send such a pr.
Might have been fixed by https://github.com/http-rs/surf/commit/e60727afe1661878ad68462632cff6d05aa106b3
Needed for https://github.com/deltachat/deltachat-core-rust/pull/2782