Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download: Remove cURL backend #2034

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 0 additions & 56 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ repository = "https://github.com/rust-lang/rustup.rs"
description = "Manage multiple rust installations with ease"

[features]
default = ["curl-backend", "reqwest-backend"]
curl-backend = ["download/curl-backend"]
reqwest-backend = ["download/reqwest-backend"]
vendored-openssl = ['openssl/vendored']
# Include in the default set to disable self-update and uninstall.
no-self-update = []
Expand All @@ -32,8 +29,7 @@ home = "0.5"
lazy_static = "1"
libc = "0.2"
opener = "0.4.0"
# Used by `curl` or `reqwest` backend although it isn't imported
# by our rustup.
# Used by `reqwest` although it isn't imported by our rustup.
openssl = { version = "0.10", optional = true }
pulldown-cmark = { version = "0.6", default-features = false }
rand = "0.7"
Expand Down
19 changes: 0 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -559,25 +559,6 @@ On Windows, the command would be:
set https_proxy=socks5://proxy.example.com:1080
```

If you need a more complex setup, rustup supports the convention used by
the __curl__ program, documented in the ENVIRONMENT section of
[its manual page][curlman].

The use of `curl` is presently **deprecated**, however it can still be used by
providing the `RUSTUP_USE_CURL` environment variable, for example:

```bash
RUSTUP_USE_CURL=1 rustup update
```

Note that some versions of `libcurl` apparently require you to drop the
`http://` or `https://` prefix in environment variables. For example,
`export http_proxy=proxy.example.com:1080` (and likewise for HTTPS).
If you are getting an SSL `unknown protocol` error from `rustup` via `libcurl`
but the command-line `curl` command works fine, this may be the problem.

[curlman]: https://curl.haxx.se/docs/manpage.html


## Examples

Expand Down
2 changes: 1 addition & 1 deletion ci/build-run-docker.bash
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ docker run \

# check that rustup-init was built with ssl support
# see https://github.com/rust-lang/rustup.rs/issues/1051
if ! (nm target/"${TARGET}"/release/rustup-init | grep -q Curl_ssl_version); then
if ! (nm target/"${TARGET}"/release/rustup-init | grep -q openssl_sys); then
echo "Missing ssl support!!!!" >&2
exit 1
fi
14 changes: 3 additions & 11 deletions download/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,12 @@ authors = [ "Brian Anderson <[email protected]>" ]

license = "MIT/Apache-2.0"

[features]

default = ["reqwest-backend"]

curl-backend = ["curl"]
reqwest-backend = ["reqwest", "env_proxy", "lazy_static"]

[dependencies]
lazy_static = "1.0"
env_proxy = "0.3.1"
error-chain = "0.12"
reqwest = { version = "0.9.14", features = ["socks"] }
url = "1.7"
curl = { version = "0.4.11", optional = true }
env_proxy = { version = "0.3.1", optional = true }
lazy_static = { version = "1.0", optional = true }
reqwest = { version = "0.9.14", features = ["socks"], optional = true }

[dev-dependencies]
futures = "0.1"
Expand Down
6 changes: 1 addition & 5 deletions download/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ error_chain! {

foreign_links {
Io(std::io::Error);
Reqwest(::reqwest::Error) #[cfg(feature = "reqwest-backend")];
Reqwest(::reqwest::Error);
}

errors {
Expand All @@ -16,9 +16,5 @@ error_chain! {
FileNotFound {
description("file not found")
}
BackendUnavailable(be: &'static str) {
description("download backend unavailable")
display("download backend '{}' unavailable", be)
}
}
}
Loading