Repository navigation
feat(http, upload): update reqwest to 0.13 - #3593
Conversation
`tauri-plugin-http` re-exports `reqwest`, so moving it is a breaking change and belongs on v3 rather than v2 (tauri-apps#3462). `tauri-plugin-updater` already took 0.13 in tauri-apps#3213; these two follow the same shape. `rustls-tls` maps to `reqwest/rustls-no-provider` plus `rustls` with `ring`, and the provider is installed as the process default only when none is set yet, exactly as the updater does. Without it `reqwest::Client::new()` has no crypto provider to build with. Features reqwest 0.13 removed are removed here rather than remapped silently: - `native-tls-alpn`: ALPN is part of `native-tls` now. - `rustls-tls-manual-roots`, `rustls-tls-webpki-roots`, `rustls-tls-native-roots`: certificate verification goes through the platform verifier. - `trust-dns`: renamed `hickory-dns`. - `macos-system-configuration`: superseded by `system-proxy`, which the default feature set already carries and which the deprecation note pointed at. Verified with the CI commands for both packages: clippy --all-targets and clippy --all-targets --all-features under -D warnings, cargo test (http 8, upload 7 with --all-features), and cargo fmt --all --check.
|
imo we should completely remove the re-export until reqwest hits v1. I think we'll be on v3 a bit longer than on v2. wdyt @Legend-Master |
|
Why did we export it at the first place? 😂 |
|
as a replacement for the actual rust apis we had in v1 / added on mobile. For the record, i was against it :P |
|
Remove the re-export then, just add it directly in your rust code if you want to use it in rust side |
# Conflicts: # Cargo.lock # plugins/http/src/commands.rs # plugins/upload/Cargo.toml
Package Changes Through 9286494There are 4 changes which include http with prerelease, http-js with prerelease, upload with prerelease, upload-js with prerelease Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
Moves
tauri-plugin-httpandtauri-plugin-uploadtoreqwest0.13, againstv3.tauri-plugin-httpre-exportsreqwest, so this is breaking and cannot land on v2 — that is the conclusion in #3462, and why Renovate's #3579 targets the wrong branch.tauri-plugin-updateralready moved in #3213, and this follows its shape.rustls
rustls-tlsmaps toreqwest/rustls-no-providerplusrustlswithring, and the provider is installed as the process default only when none is set, exactly as the updater does:In
uploadthat lives in onehttp_client()helper, since both commands build their own client andreqwest::Client::new()panics when the builder has no provider.Features reqwest 0.13 removed
Removed here rather than silently remapped, so a user gets a "no such feature" error instead of different TLS behaviour:
native-tls-alpnnative-tlsrustls-tls-manual-roots,rustls-tls-webpki-roots,rustls-tls-native-rootsrustls-tlstrust-dnshickory-dnsmacos-system-configurationsystem-proxy, already in the default setThe
macos-system-configurationremoval follows the deprecation note added in #3528.Verification
Per-package CI commands, on macOS:
cargo clippy --package tauri-plugin-http --all-targets -- -D warnings: cleancargo clippy --package tauri-plugin-http --all-targets --all-features -- -D warnings: cleancargo clippy --package tauri-plugin-upload --all-targets --all-features -- -D warnings: cleancargo test --package tauri-plugin-http --all-targets: 8 passedcargo test --package tauri-plugin-upload --all-targets --all-features: 7 passedcargo fmt --all -- --check: cleanChange files are included for both packages.