Commit graph

243 commits

Author SHA1 Message Date
Alex Crichton 468f243e0e Parallelize downloads with HTTP/2
This commit implements parallel downloads using `libcurl` powered by
`libnghttp2` over HTTP/2. Using all of the previous refactorings this actually
implements usage of `Multi` to download crates in parallel. This achieves some
large wins locally, taking download times from 30s to 2s in the best case.

The standard output of Cargo is also changed as a result of this commit. It's
no longer useful for Cargo to print "Downloading ..." for each crate really as
they all start instantaneously. Instead Cargo now no longer prints `Downloading`
by default (unless attached to a pipe) and instead only has one progress bar for
all downloads. Currently this progress bar is discrete and based on the total
number of downloads, no longer specifying how much of one particular download
has happened. This provides a less granular view into what Cargo is doing but
it's hoped that it looks reasonable from an outside perspective as there's
still a progress bar indicating what's happening.
2018-09-18 11:33:04 -07:00
Alex Crichton aab0a33859 Bump cargo to 0.32.0
It's that time of every-6-weeks!
2018-09-17 18:42:51 -07:00
bors 8201560b69 Auto merge of #5988 - Eh2406:explore_the_bug, r=alexcrichton
BUG fuzzing found a bug in the resolver, we need a complete set of conflicts to do backjumping

As mentioned in https://github.com/rust-lang/cargo/pull/5921#issuecomment-418890269, the new proptest found a live bug! This PR so far tracs my attempt to minimize the problematic input.

The problem turned out to be that we where backjumping on incomplete set of conflicts.
2018-09-17 22:01:12 +00:00
Eh2406 682b295257 bump env_logger to a more minimal-versions compatible one 2018-09-17 17:58:38 -04:00
Alex Crichton 0b30a790b1 Bump Cargo to 0.30.0
Looks like we accidentally forgot to do this!
2018-09-07 08:43:02 -07:00
dependabot[bot] e36ae43400
Update opener requirement from 0.2.0 to 0.3.0
Updates the requirements on [opener](https://github.com/Seeker14491/opener) to permit the latest version.
- [Release notes](https://github.com/Seeker14491/opener/releases)
- [Changelog](https://github.com/Seeker14491/opener/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Seeker14491/opener/commits/v0.3.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-08-20 05:27:11 +00:00
bors a284c3ff96 Auto merge of #5856 - Eh2406:min-test, r=alexcrichton
run some tests with minimal-versions on CI

In #5757 we discovered that sum test don't pass with minimal-versions, and so only added CI for `cargo check`. This PR is to see if that is still needed, and if it is then which test rely on upstream bugfix.
2018-08-15 17:00:22 +00:00
Jacob Finkelman c4d565fc8f Try serde_json 2018-08-14 10:58:42 -04:00
Eh2406 1eaae61289 get features_are_quoted working with minimal-versions on CI 2018-08-14 10:58:42 -04:00
Brian Bowman 48d0708aa6 Handle opening browser with opener crate
Fixes #5701
2018-08-13 21:00:34 -05:00
bors 0e7a46e327 Auto merge of #5858 - dekellum:git-check-logging-and-test, r=alexcrichton
Improve verbose console and log for finding git repo in package check

Third attempt to resolve #5823 by improving logging and tests. This exposes the issue to testing,  via verbose console output and is dependent on alexcrichton/git2-rs#341 as just released in git2 0.7.5 crate. Thus tests *should* now pass on all platforms, incl. windows, but I also intend to bump the minimal git2 release dependency (in a subsequently added commit).

cc: @Eh2406 thanks for your fix and help!
2018-08-07 22:19:54 +00:00
bors 2b6e99639f Auto merge of #5862 - kennytm:capture-rustc-output, r=alexcrichton
Fully capture rustc and rustdoc output when -Zcompile-progress is passed

Fixes #5764 and #5695.

On Windows, we will parse the ANSI escape code into console commands via my `fwdansi` package, based on @ishitatsuyuki's idea in https://github.com/rust-lang/cargo/issues/5695#issuecomment-406300234. Outside of Windows the content is forwarded as-is.
2018-08-06 15:12:01 +00:00
Alex Crichton 585c7d43f9 Add a feature to build a vendored OpenSSL
This will be enabled through rust-lang/rust to ensure that for dist builds we
can build a Cargo with a vendored OpenSSL
2018-08-04 23:02:57 -07:00
kennytm 641f7ff2c7
Capture output from rustc and rustdoc. 2018-08-04 00:51:42 +08:00
David Kellum fcd86f3270 Update git2 minimal version to 0.7.5 for a fix 2018-08-02 15:46:19 -07:00
Alex Crichton 4477355b01 Switch strategies for how rustc's workspace is unioned
See rust-lang/rust#52919 for more details.
2018-08-01 21:28:47 -07:00
Alex Crichton adbd625e35 Upgrade to failure 0.1.2 idioms
Fixes some deprecation warnings in Cargo
2018-08-01 07:20:04 -07:00
Alex Crichton 876a50366b fix: Iteratively apply suggestions from the compiler
This commit updates the `cargo fix` implementation to iteratively apply fixes
from the compiler instead of only once. Currently the compiler can sometimes
emit overlapping suggestions, such as in the case of transitioning

    ::foo::<::Bar>();

to ...

    crate::foo::<crate::Bar>();

and `rustfix` rightfully can't handle overlapping suggestions as there's no
clear way of how to disambiguate the fixes. To fix this problem Cargo will now
run `rustc` and `rustfix` multiple times, attempting to reach a steady state
where no fixes failed to apply.

Naturally this is a pretty tricky thing to do and we want to be sure that Cargo
doesn't loop forever, for example. A number of safeguards are in place to
prevent Cargo from going off into the weeds when fixing files, notably avoiding
to reattempt fixes if no successful fixes ended up being applied.

Closes #5813
Closes rust-lang/rust#52754
2018-07-31 14:20:58 -07:00
dependabot[bot] 6f11cd9e14
Update crossbeam-utils requirement to 0.5
Updates the requirements on [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam-utils) to permit the latest version.
- [Release notes](https://github.com/crossbeam-rs/crossbeam-utils/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam-utils/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam-utils/commits/v0.5.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-07-26 05:30:17 +00:00
Dale Wijnand 8ea90e96cf
Switch to crossbeam_utils crate, sidesteppin 2018-07-25 23:32:25 +01:00
Dale Wijnand ac2d5d0917
Update the minimal parking_lot_core version 2018-07-25 17:11:26 +01:00
dependabot[bot] 4b73ed06cb
Update crossbeam requirement to 0.4
Updates the requirements on [crossbeam](https://github.com/crossbeam-rs/crossbeam) to permit the latest version.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-07-25 05:31:03 +00:00
Eh2406 4a8c70ecc0 update curl so we don't need so may hacks 2018-07-24 10:41:10 -04:00
Eh2406 96d3c05f84 typo 2018-07-23 10:42:36 -04:00
Eh2406 f6a29a7707 clarify synthetic nature of dep 2018-07-21 12:35:35 -04:00
Eh2406 8a7123c79e update min dependencies to build with minimal-versions on windows 2018-07-20 22:04:27 -04:00
Eh2406 adc8b5d6e1 update min dependencies to build with minimal-versions
Big thanks to @klausi for doing most of the work!
Thanks to @matklad for pointing out that we could finish it.
2018-07-20 17:13:08 -04:00
dependabot[bot] 413e6489ff
Update termcolor requirement to 1.0
Updates the requirements on [termcolor](https://github.com/BurntSushi/termcolor) to permit the latest version.
- [Release notes](https://github.com/BurntSushi/termcolor/releases)
- [Commits](https://github.com/BurntSushi/termcolor/commits/wincolor-1.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-07-18 05:36:04 +00:00
Alex Crichton b02ba3771e Import cargo fix directly in to Cargo
This commit imports the `cargo fix` subcommand in rust-lang-nursery/rustfix
directly into Cargo as a subcommand. This should allow us to ease our
distribution story of `cargo fix` as we prepare for the upcoming 2018 edition
release.

It's been attempted here to make the code as idiomatic as possible for Cargo's
own codebase. Additionally all tests from cargo-fix were imported into Cargo's
test suite as well. After this lands and is published in nightly the `cargo-fix`
command in rust-lang-nursery/rustfix will likely be removed.

cc rust-lang/rust#52272
2018-07-16 21:58:58 -07:00
dependabot[bot] 2f8c049e47
Update lazycell requirement to 1.0
Updates the requirements on [lazycell](https://github.com/indiv0/lazycell) to permit the latest version.
- [Release notes](https://github.com/indiv0/lazycell/releases)
- [Changelog](https://github.com/indiv0/lazycell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/indiv0/lazycell/commits/v1.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-07-06 20:11:14 +00:00
Nick Cameron 4671a2aa7a Add missing winapi features
To support RLS in Rust repo, features from https://github.com/rust-lang/rust/pull/51677#issuecomment-402781751
2018-07-06 11:05:12 +12:00
kennytm a8081a007e
More fixes. 2018-06-30 01:39:35 +08:00
Alex Crichton b89917a903 Bump to 0.30.0 2018-06-27 11:49:57 -07:00
Alex Crichton 1ac02cebc4 Update version of core-foundation crate 2018-05-22 19:46:30 -07:00
Alex Crichton f7e5315e98 Bump to 0.29.0 2018-05-07 19:40:58 -07:00
Klaus Purer ecbbc90f3a fix(dependendies): Bump minimal dependency versions so that cargo successfully builds with those 2018-04-22 20:55:53 +02:00
Alex Crichton 039ca019d7 Bump version of filetime dependency 2018-04-17 15:08:04 -07:00
Alex Crichton a79c2ab6bc Bump to 0.28.0
Looks like we've forgotten to do this so far on nightly!
2018-04-16 20:29:41 -07:00
Bastien Orivel 8daf81e193 Replace tempdir by tempfile
The former has been deprecated in favor of the latter
2018-03-26 13:29:02 +02:00
Alex Crichton 46b18260d9 More effort to only compile Cargo once
Hopefully one final change necessary for rust-lang/rust#49053
2018-03-25 23:52:55 -07:00
Alex Crichton 7cab2b20b3 Remove scoped_tls dependency
This is causing [conflicts] with rebuilding upstream in rust-lang/rust, so
remove this for now until we figure out a better solution.

[conflicts]: https://github.com/rust-lang/rust/pull/49053#issuecomment-375906970
2018-03-24 12:54:26 -07:00
Aleksey Kladov a1735c7aff Regression tests for #5201
Better safe than sorry!
2018-03-19 23:51:49 +03:00
Alex Crichton 841f20ae71 Add a synthetic dependency on num-traits
Right now the rust-lang/rust integration is compiling Cargo twice on dist
builds, once for Cargo and once for the RLS. This is due to a dependency of
Cargo being recompiled with different features when used from the RLS or not.
For now paper over this problem with a synthetic dependency to prevent Cargo
from being compiled twice.
2018-03-15 11:00:32 -07:00
Aleksey Kladov cbd14ee8f0 Use conventions to specify the integration tests 2018-03-14 14:55:19 +03:00
bors 3cfb23bc56 Auto merge of #5152 - matklad:clap, r=alexcrichton
Clap

Reopening of #5129

So, looks like all tests are 🍏 on my machine!

I definitely want to refactor it some more, and also manually checked that we haven't regressed any help messages, but all the major parts are in place already.
2018-03-13 14:46:45 +00:00
Matthias Krüger 63d87d92a3 remove "filetime 0.1" dependency from dev profile, filetime is already a regular dependency. 2018-03-11 15:08:12 +01:00
Aleksey Kladov 285fbdfe3b Remove docopt dependency 2018-03-08 23:38:08 +03:00
Aleksey Kladov 38f81e05b3 Port bench and build to clap 2018-03-08 23:30:46 +03:00
Eh2406 1f764c5548 make a global string interner
In a test on https://github.com/rust-lang/cargo/issues/4810#issuecomment-357553286
Before we got to 5000000 ticks in ~72 sec
After we got to 5000000 ticks in ~65 sec
2018-03-06 15:30:56 -05:00
Alex Crichton 2a063798eb Drop outdated hamcrest dependency
This hasn't been updated in awhile and in general we've been barely using it.
This drops the outdated dependency and vendors a small amount of the
functionality that it provided. I think eventually we'll want to transition away
from this method of assertions but I wanted to get this piece in to avoid too
much churn in one commit.
2018-03-01 11:03:54 -08:00