Commit Graph

492 Commits

Author SHA1 Message Date
Eric Huss b52a01e360 Bump to 0.43.0 2019-12-21 14:13:53 -08:00
Matthias Krüger 8245e02924 bump git2 dependencies 2019-12-19 23:29:41 +01:00
Eric Huss fd65cbd816 Bump cargo-platform version. 2019-12-10 11:59:06 -08:00
Ralf Jung dc0959717c bump im-rc version 2019-11-19 15:36:46 +01:00
dependabot-preview[bot] 7762e73f73
Update core-foundation requirement from 0.6.0 to 0.7.0
Updates the requirements on [core-foundation](https://github.com/servo/core-foundation-rs) to permit the latest version.
- [Release notes](https://github.com/servo/core-foundation-rs/releases)
- [Commits](https://github.com/servo/core-foundation-rs/compare/core-foundation-v0.6.2...core-foundation-v0.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-13 05:12:59 +00:00
Eric Huss 1df81ee07e Bump to 0.42.0, Update changelog 2019-11-07 11:19:48 -08:00
dependabot-preview[bot] 2ed8f4f013
Update crossbeam-utils requirement from 0.6 to 0.7
Updates the requirements on [crossbeam-utils](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/compare/crossbeam-utils-0.6.0...crossbeam-utils-0.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-07 05:12:30 +00:00
Alex Crichton 35bcbde3ac Update `curl-sys` dependency requirement
Pulls in alexcrichton/curl-rust#304 which fixes a bug from the last curl
update in #7308. This bug was not introduced by the Cargo PR itself but
rather by updating the `curl` submodule in the `curl-sys` crate. Without
this bugfix all downloads of a crate will make a new connection to
crates.io, which drastically increases download time since setting up a
connection takes so long.
2019-10-01 14:36:04 -07:00
Guanqun Lu d7071c2ff9 unify the quote in Cargo.toml 2019-10-01 15:39:57 +08:00
bors 8ae8b5ea98 Auto merge of #7308 - guanqun:add-ssl-version, r=alexcrichton
add an option to specify ssl version

Fixes #6684
2019-09-30 18:35:21 +00:00
Eric Huss 8ad031b54f Bump to 0.41.0, Update changelog 2019-09-27 09:02:13 -07:00
Guanqun Lu 05d88bf4dc add an option to specify ssl version
Fixes #6684
2019-09-26 23:05:09 +08:00
dependabot-preview[bot] 8f52dc9a87
Update env_logger requirement from 0.6.0 to 0.7.0
Updates the requirements on [env_logger](https://github.com/sebasmagri/env_logger) to permit the latest version.
- [Release notes](https://github.com/sebasmagri/env_logger/releases)
- [Changelog](https://github.com/sebasmagri/env_logger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sebasmagri/env_logger/compare/v0.6.0...v0.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-24 05:20:49 +00:00
bors 7ab477866e Auto merge of #7375 - ehuss:extract-platform, r=alexcrichton
Extract Platform to a separate crate.

This moves the `Platform`, `Cfg`, `CfgExpr` types to a new crate named "cargo-platform".  The intent here is to give users of `cargo_metadata` a way of parsing and inspecting cargo's platform values.

Along the way, I rewrote the error handling to remove `failure`, and to slightly improve the output.

I'm having doubts whether or not this is a good idea.  As you can see from the `examples/matches.rs` example, it is nontrivial to use this (which also misses cargo's config values and environment variables).  I don't know if anyone will actually use this.  If this doesn't seem to have value, I would suggest closing it.

I've also included a sample script, `publish.py`, for publishing cargo itself.  I suspect it will need tweaking, but I figure it would be a start and open for feedback.
2019-09-20 18:05:09 +00:00
dependabot-preview[bot] fa05eb2313
Update hex requirement from 0.3 to 0.4
Updates the requirements on [hex](https://github.com/KokaKiwi/rust-hex) to permit the latest version.
- [Release notes](https://github.com/KokaKiwi/rust-hex/releases)
- [Commits](https://github.com/KokaKiwi/rust-hex/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-18 05:15:16 +00:00
Eric Huss 57c96c194a Extract Platform to a separate crate. 2019-09-17 14:55:22 -07:00
bors cdf7f6380a Auto merge of #7374 - alexcrichton:less-url-serde, r=ehuss
Don't require the `serde` feature of `url`

Ends up meaning that in full crate compiles that `url` doesn't wait for
`serde` to finish, which in turn enables crates like `git2` to start
sooner!
2019-09-17 20:58:08 +00:00
bors d764fff2da Auto merge of #7311 - ehuss:pipeline-timing, r=alexcrichton
Experiment: Create timing report.

This is just an experiment, so I'm not sure if we'll want to merge it.

This adds an HTML report which gets saved to disk when the build is finished.  It is primarily geared for identifying slow dependencies, and for visualizing how pipelining affects the build.

Here's an example: https://ehuss.github.io/cargo-timing.html
You can mouse over the blocks to highlight the reverse-dependencies that are released when a unit finishes.  `syn` is a really good example.

It does a few other things, like displaying a message after each unit is finished.  See the docs for more information.
2019-09-17 20:33:15 +00:00
Alex Crichton 2f79b202ee Don't require the `serde` feature of `url`
Ends up meaning that in full crate compiles that `url` doesn't wait for
`serde` to finish, which in turn enables crates like `git2` to start
sooner!
2019-09-17 12:47:31 -07:00
Alex Crichton 9115b2c326 Extract `support` directory to its own crate
Extract out all our test support code to its own standalone crate so it
can be shared between multiple test suites if necessary.
2019-09-16 11:47:09 -07:00
Eric Huss 0664484552 Experiment: Create timing report. 2019-09-14 09:23:04 -07:00
Matthias Krüger d551d90455 add readme key to cargos manifest.
This should make the readme display on cargos crates.io page
2019-09-10 11:16:58 +02:00
Lzu Tao 1c9b292a2e Update home dependencies to v0.5
This home's release remove support for the old `.multirust`
directory. Also it fixes rustup_home and cargo_home implementation
when corresponding environment variables are absolute paths.
2019-08-21 20:24:06 +07:00
Alex Crichton 2a670c128b Update libgit2 dependencies
Pulls in a few fixes for libgit2, including some security-related
updates.
2019-08-20 13:05:51 -07:00
Eric Huss 5c7875d2e0 Bump to 0.40.0, Update changelog 2019-08-19 14:27:15 -07:00
dependabot-preview[bot] 09dc727f04
Update serde_ignored requirement from 0.0.4 to 0.1.0
Updates the requirements on [serde_ignored](https://github.com/dtolnay/serde-ignored) to permit the latest version.
- [Release notes](https://github.com/dtolnay/serde-ignored/releases)
- [Commits](https://github.com/dtolnay/serde-ignored/compare/0.0.4...0.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-19 06:26:20 +00:00
bors 60b7bf0045 Auto merge of #7247 - Eijebong:home, r=ehuss
Update home to 0.4
2019-08-13 23:59:51 +00:00
Eric Huss b41c209af3 Bump toml 0.5.3 2019-08-13 14:56:22 -07:00
Bastien Orivel dd20d69e49 Update home to 0.4.2 2019-08-13 17:46:10 +02:00
Eric Huss f3d4c6b8f5 Bump rustfix 2019-08-07 07:49:28 -07:00
Eric Huss 4f6553ab55 Use canonical paths when parsing dep-info.
Instead of treating Windows differently, this just always uses canonical paths
on all platforms.  This fixes a problem where symlinks were not treated
correctly on all platforms.

Switching rm_rf to the remove_dir_all crate because deleting symbolic links on
Windows is difficult.
2019-07-25 12:10:55 -07:00
bors 5251d92d47 Auto merge of #7175 - alexcrichton:update-url, r=ehuss
Update the `url` crate to 2.0

Looks like minor API changes, primarily around percent encoding.
2019-07-25 18:04:59 +00:00
bors c2ef5fddd0 Auto merge of #7176 - alexcrichton:update-git2, r=ehuss
Tighten requirements for git2 crates

Bring in a few updates, used to update libgit2 and fix a Windows issue
as well as updating the `url` dependencies.

Closes #7173
2019-07-25 17:21:07 +00:00
Alex Crichton bd7fe8914b Fix a deadlocking test with master libgit2
This commit fixes a test in Cargo to work around a seeming regression in
behavior in libgit2 around HTTP authentication. The expected flow for
HTTP authentication with git is that git sends an HTTP request and
receives an "unauthorized" response. It then sends another request with
authorization information and that's what we're testing is received in
the our test.

Previously libgit2 would issue a new HTTP connection if the previous one
was closed, but it looks like changes in libgit2 now require that the
same HTTP connection is used for the initial request and the subsequent
request with authorization information. This broke our test since it's
not using an HTTP compliant server at all and is just some handwritten
TCP reads/writes. The fix here is to basically stay with handwritten TCP
reads/writes but tweak how it happens so it's all on the same HTTP/TCP
connection to match what libgit2 is expecting.

Some extra assertions have also been added to try to prevent deadlocks
from happening in the future and instead make the test fail fast if this
situation comes up again.
2019-07-25 09:15:24 -07:00
Alex Crichton ae6778063f Tighten requirements for git2 crates
Bring in a few updates, used to update libgit2 and fix a Windows issue
as well as updating the `url` dependencies.

Closes #7173
2019-07-24 09:49:23 -07:00
Alex Crichton 3c67dc8430 Update the `url` crate to 2.0
Looks like minor API changes, primarily around percent encoding.
2019-07-24 08:26:28 -07:00
Lukas Lueg 91186e8c58 Remove byteorder-dependency 2019-07-08 12:35:34 +02:00
Eric Huss 2208c1f62f Bump to 0.39.0 2019-07-05 10:42:46 -07:00
Alex Crichton 290a727ad0 Extract resolver tests to their own crate
These tests take a good amount of time to run locally and they're also
causing a lot of dependencies to get pulled into rust-lang/rust, so
let's have a separate crate that we just test on our own CI
2019-06-18 10:50:48 -07:00
Alex Crichton e449cb23e3 Move the `crates-io` crate to a `crates` directory
That way when we add more crates we've got a place to put them!
2019-06-18 10:47:44 -07:00
Eric Huss a8c22ca1e8 Update to allow publishing cargo-test-macro. 2019-06-07 13:22:10 -07:00
Jethro Beekman a598309cb6 Don't rely on a thread local to uniquely create test roots 2019-06-07 12:41:25 -07:00
Josh Stone 1065102dc7 Update git2 crates for libgit2 0.28
See https://github.com/rust-lang/git2-rs/pull/425
2019-06-06 18:04:23 -07:00
bors a7648c7542 Auto merge of #6980 - Eh2406:varisat, r=alexcrichton
Test the Resolver against the varisat Library

Resolution can be reduced to the SAT problem. So this is an alternative implementation of the resolver that uses a SAT library for the hard work. This is intended to be easy to read, as compared to the real resolver, and run as part of the test sweet to make sure the real resolver works as expected. Part of #6120.

Some notes on performance:
The initial version did not support public & private deps:
~64 loc, `O(nln(n))` vars, `O(nln(n) + n*d)` clauses, 0.5x slower on `prop_passes_validation`
The final version:
~163 loc, `O(dn^2`) vars, `O(dn^3)`  clauses, 1.5x slower on `prop_passes_validation`

That comparison makes me feel better about spending months trying to get public & private deps to be fast enough for stabilization.
2019-05-28 15:13:28 +00:00
Eric Huss 353f7c0e1a Bump to 0.38.0 2019-05-23 10:03:14 -07:00
Eh2406 9602b78cc7 use varisat to verify the resolver 2019-05-21 12:11:25 -04:00
Eric Huss dcd4999d42 Add message caching. 2019-05-20 15:22:32 -07:00
dependabot[bot] 966e7f9f83
Update im-rc requirement from 12.1.0 to 13.0.0
Updates the requirements on [im-rc](https://github.com/bodil/im-rs) to permit the latest version.
- [Release notes](https://github.com/bodil/im-rs/releases)
- [Changelog](https://github.com/bodil/im-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bodil/im-rs/compare/12.1.0...13.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-20 05:41:28 +00:00
Eric Huss 337fbaaa12 Fix version of `ignore`.
Some tests relied on new behavior, so bump the minimal version.

The change to `gitignore_negate` was just an innocuous typo.
2019-05-13 18:05:10 -07:00
bors 22e2f23d5c Auto merge of #6880 - alexcrichton:cache, r=Eh2406
Parse less JSON on null builds

This commit fixes a performance pathology in Cargo today. Whenever Cargo
generates a lock file (which happens on all invocations of `cargo build`
for example) Cargo will parse the crates.io index to learn about
dependencies. Currently, however, when it parses a crate it parses the
JSON blob for every single version of the crate. With a lock file,
however, or with incremental builds only one of these lines of JSON is
relevant. Measured today Cargo building Cargo parses 3700 JSON
dependencies in the registry.

This commit implements an optimization that brings down the number of
parsed JSON lines in the registry to precisely the right number
necessary to build a project. For example Cargo has 150 crates in its
lock file, so now it only parses 150 JSON lines (a 20x reduction from
3700). This in turn can greatly improve Cargo's null build time. Cargo
building Cargo dropped from 120ms to 60ms on a Linux machine and 400ms
to 200ms on a Mac.

The commit internally has a lot more details about how this is done but
the general idea is to have a cache which is optimized for Cargo to read
which is maintained automatically by Cargo.

Closes #6866
2019-05-03 14:37:34 +00:00
Alex Crichton 6babe72e7c Parse less JSON on null builds
This commit fixes a performance pathology in Cargo today. Whenever Cargo
generates a lock file (which happens on all invocations of `cargo build`
for example) Cargo will parse the crates.io index to learn about
dependencies. Currently, however, when it parses a crate it parses the
JSON blob for every single version of the crate. With a lock file,
however, or with incremental builds only one of these lines of JSON is
relevant. Measured today Cargo building Cargo parses 3700 JSON
dependencies in the registry.

This commit implements an optimization that brings down the number of
parsed JSON lines in the registry to precisely the right number
necessary to build a project. For example Cargo has 150 crates in its
lock file, so now it only parses 150 JSON lines (a 20x reduction from
3700). This in turn can greatly improve Cargo's null build time. Cargo
building Cargo dropped from 120ms to 60ms on a Linux machine and 400ms
to 200ms on a Mac.

The commit internally has a lot more details about how this is done but
the general idea is to have a cache which is optimized for Cargo to read
which is maintained automatically by Cargo.

Closes #6866
2019-05-03 07:23:00 -07:00
Igor Gnatenko c14a329714
chore: Update opener to 0.4 2019-05-03 10:28:12 +02:00
bors f2ea95a37a Auto merge of #6861 - fluffysquirrels:http2-stream-error-spurious, r=alexcrichton
Treat HTTP/2 stream errors as spurious network errors.

Closes https://github.com/rust-lang/cargo/issues/6788.
2019-04-18 15:08:24 +00:00
Alex Helfet cc29c2b609 Treat HTTP/2 stream errors as spurious network errors. 2019-04-18 11:33:15 +01:00
Eric Huss 2923cfa390 Bump to 0.37.0 2019-04-15 12:09:02 -07:00
dependabot[bot] 227aa851f6
Update toml requirement from 0.4.2 to 0.5.0
Updates the requirements on [toml](https://github.com/alexcrichton/toml-rs) to permit the latest version.
- [Release notes](https://github.com/alexcrichton/toml-rs/releases)
- [Commits](https://github.com/alexcrichton/toml-rs/compare/0.4.2...0.5.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-18 05:35:49 +00:00
Eh2406 ed9386bd24 Proptest 0.9.1
This is a rework of #6636 now possible do to the change in testing from #6748
2019-03-16 08:00:39 -04:00
Alex Crichton d19b41f2c6 Release a jobserver token while locking a file
This is intended to fix #6747 where multiple Cargos invoked with the
same jobserver would all have their own token but not actually run
concurrently due to file locking. Instead the fix is that whenever Cargo
blocks for a file lock with a configured global jobserver, a token is
released just before we block and then reacquired afterwards. This way
we should ensure that we're not hogging a cpu/token unnecessarily
without doing any work!

Closes #6747
2019-03-15 07:07:06 -07:00
Eric Huss 78a60bc74f Stricter package change detection. 2019-03-12 20:33:45 -07:00
dependabot[bot] 5087cc45e4
Update glob requirement from 0.2.11 to 0.3.0
Updates the requirements on [glob](https://github.com/rust-lang/glob) to permit the latest version.
- [Release notes](https://github.com/rust-lang/glob/releases)
- [Commits](https://github.com/rust-lang/glob/compare/0.2.11...0.3.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-07 05:50:26 +00:00
Eric Huss 1a0430fd88 Bump to 0.36.0 2019-03-04 22:12:21 -08:00
Dale Wijnand 53a0995b4b
Add detail to multiple rename deps 2019-01-28 16:03:30 +00:00
Alex Crichton 78637a6bb8 Bump to 0.35.0
A routine update!
2019-01-22 13:18:16 -08:00
Eric Huss 3d84d0ad77 Add dependency `registry` to `cargo metadata`.
This adds the `registry` field for dependencies for alternate registries in
`cargo metadata`.
2018-12-29 21:14:25 -08:00
dependabot[bot] ed66cbc700
Update git2-curl requirement from 0.8.1 to 0.9.0
Updates the requirements on [git2-curl](https://github.com/alexcrichton/git2-rs) to permit the latest version.
- [Release notes](https://github.com/alexcrichton/git2-rs/releases)
- [Commits](https://github.com/alexcrichton/git2-rs/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-14 16:30:00 +00:00
dependabot[bot] 56dffe70cd
Update git2 requirement from 0.7.5 to 0.8.0
Updates the requirements on [git2](https://github.com/alexcrichton/git2-rs) to permit the latest version.
- [Release notes](https://github.com/alexcrichton/git2-rs/releases)
- [Commits](https://github.com/alexcrichton/git2-rs/commits/git2-curl-0.8.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-14 05:51:03 +00:00
Eric Huss 502ab6505c Update rustfix to 0.4.4. 2018-12-13 14:01:44 -08:00
Eric Huss fffb05d8fc Display errors when `cargo fix` fails.
It can be difficult to figure out what's wrong when a user reports that
`cargo fix` fails. There's often a large list of warnings, and it can
be hard to figure out which one caused a compile error.
2018-12-13 13:59:06 -08:00
Dale Wijnand 0e031b5a96
Allow testsuite warnings in dev
This makes the deny(warnings) in the testsuite conditional on a new
"deny-warnings" feature, that is then enabled in CI.

Ideally I could use the (reasonably well established) CI env var (like
we do for proptests), but I don't know how to get the attribute to be
defined in terms of an env var.
2018-12-13 01:03:08 +00:00
Alex Crichton 76ce4dfebd Reformat after idiom lints 2018-12-11 05:54:56 -08:00
Alex Crichton 9ed82b5779 Start using 2018 idioms in Cargo
Remove a number of `extern crate` directives and tweak a number of
imports. Not all `extern crate` is gone yet but this is the bulk of
them!
2018-12-11 05:45:46 -08:00
Alex Crichton 1b886f7072 Bump to 0.34.0 2018-12-08 03:07:46 -08:00
bors 41a7e150fc Auto merge of #6387 - dwijnand:rust-2018, r=dwijnand
Upgrade to Rust 2018 & fix edition idioms

None
2018-12-07 16:37:19 +00:00
dependabot[bot] c8d9085fd3
Update pretty_env_logger requirement from 0.2 to 0.3
Updates the requirements on [pretty_env_logger](https://github.com/seanmonstar/pretty-env-logger) to permit the latest version.
- [Release notes](https://github.com/seanmonstar/pretty-env-logger/releases)
- [Commits](https://github.com/seanmonstar/pretty-env-logger/commits/v0.3.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-07 06:48:49 +00:00
Dale Wijnand 04ddd4d0fc
Upgrade to Rust 2018 2018-12-06 20:18:35 +01:00
Dale Wijnand aa8eff88a9
Switch to pretty_env_logger, under --features pretty-env-logger 2018-11-30 14:13:35 +00:00
Eh2406 a703851abe try im-rs 2018-11-19 16:20:15 -05:00
Alex Crichton d9eca8c764 Enable the `zlib` feature of `flate2`
We're already pulling in zlib for other dependencies like curl/libgit2
so there's not really much use in duplicating the compression code with
miniz, so let's instruct `flate2` to use libz as well to compress and
decompress chunks.
2018-11-14 07:56:43 -08:00
bors 438c55d82e Auto merge of #6307 - alexcrichton:upgrade-crossbeam-utils, r=alexcrichton
Upgrade crossbeam-utils to 0.6.0
2018-11-13 00:47:39 +00:00
Alex Crichton 5e71ad6c5b Upgrade crossbeam-utils to 0.6.0 2018-11-12 08:04:28 -08:00
dependabot[bot] d3e22d81fd
Update env_logger requirement from 0.5.11 to 0.6.0
Updates the requirements on [env_logger](https://github.com/sebasmagri/env_logger) to permit the latest version.
- [Release notes](https://github.com/sebasmagri/env_logger/releases)
- [Commits](https://github.com/sebasmagri/env_logger/commits/v0.6.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-12 05:44:45 +00:00
Alex Crichton c181f490fc Enable HTTP/2 by default
This commit switches Cargo to using HTTP/2 by default. This is
controlled via the `http.multiplexing` configuration variable and has
been messaged out for testing [1] (although got very few responses).

There's been surprisingly little fallout from parallel downloads, so
let's see how this goes!

[1]: https://internals.rust-lang.org/t/testing-cargos-parallel-downloads/8466
2018-11-07 08:14:38 -08:00
bors f938c4f41b Auto merge of #6130 - alexcrichton:less-timeouts-u, r=ehuss
Fix timeouts firing while tarballs are extracted

This commit fixes #6125 by ensuring that while we're extracting tarballs
or doing other synchronous work like grabbing file locks we're not
letting the timeout timers of each HTTP transfer keep ticking. This is
curl's default behavior (which we don't want in this scenario). Instead
the timeout logic is inlined directly and we manually account for the
synchronous work happening not counting towards timeout limits.

Closes #6125
2018-11-06 01:53:17 +00:00
Khionu Sybiern 5a59494134 Remove patch and bump tar to 0.4.18
Signed-off-by: Khionu Sybiern <dev@khionu.net>
2018-11-05 11:42:19 -05:00
Khionu Sybiern 541e990681 Configure tar to not set mtime
Signed-off-by: Khionu Sybiern <dev@khionu.net>
2018-11-03 17:29:00 -04:00
Alex Crichton d2acfb6626 Bump to 0.33.0 2018-10-29 09:14:07 -07:00
Alex Crichton 0b0f089d3d Fix timeouts firing while tarballs are extracted
This commit fixes #6125 by ensuring that while we're extracting tarballs
or doing other synchronous work like grabbing file locks we're not
letting the timeout timers of each HTTP transfer keep ticking. This is
curl's default behavior (which we don't want in this scenario). Instead
the timeout logic is inlined directly and we manually account for the
synchronous work happening not counting towards timeout limits.

Closes #6125
2018-10-12 10:24:29 -07:00
Igor Matuszewski c1763256ac Bump flate2 to 1.0.3 2018-10-05 12:48:04 +02:00
Igor Matuszewski bcaaab03a8 Bump libgit2-sys to 0.7.9 2018-10-04 17:14:38 +02:00
bors 4e09634983 Auto merge of #5921 - Eh2406:proptest, r=alexcrichton
use proptest to fuzz the resolver

This has been a long time goal. This uses proptest to generate random registry indexes and throws them at the resolver.

It would be simple to generate a registry by,
1. make a list of name and version number each picked at random
2. for each pick a list of dependencies by making a list of name and version requirements at random.

Unfortunately, it would be extremely unlikely to generate any interesting cases, as the chance that the random name you depend on was also generated as the name of a crate is vanishingly small. So this implementation works very hard to ensure that it only generates valid dependency requirements.

This is still a WIP as it has many problems:
- [x] The current strategy is very convoluted. It is hard to see that it is correct, and harder to see how it can be expanded. Thanks to @centril for working with me on IRC to get this far. Do you have advice for improving it?
- [X] It is slow as molasses when run without release. I looked with a profilere and we seem to spend 2/3 of the time in `to_url`. Maybe we can special case `example.com` for test, like we do for `crates.io` or something? Edit: Done. `lazy_static` did its magic.
- [x] `proptest` does not yet work with `minimal-versions`, a taste of my own medicine.
- [x] I have not verified that, if I remove the fixes for other test that this regenerates them.

The current strategy does not:
- [x] generate interesting version numbers, it just dose 1.0.0, 2.0.0 ...
- [x] guarantee that the version requirements are possible to meet by the crate named.
- [ ] generate features.
- [ ] generate dev-dependencies.
- [x] build deep dependency trees, it seems to prefer to generate crates with 0 or 1 dependents so that on average the tree is 1 or 2 layers deep.

And last but not least, there are no interesting properties being tested. Like:
- [ ] If resolution was successful, then all the transitive requirements are met.
- [x] If resolution was successful, then unpublishing a version of a crate that was not selected should not change that.
- [x] If resolution was unsuccessful, then it should stay unsuccessful even if any version of a crate is unpublished.

- [ ] @maurer suggested testing for consistency. Same registry, same cargo version, same lockfile, every time.
- [ ] @maurer suggested a pareto optimality property (if all else stays the same, but new package versions are released, we don't get a new lockfile where every version is <= the old one, and at least one is < the old one)
2018-09-25 00:59:33 +00:00
Eh2406 6763eded58 proptest 0.8.7 has a better `ci_no_shrink` 2018-09-24 12:17:16 -04:00
David Tolnay d1218d2961
Fix missing messages when --message-format=json is deeply nested
This commit switches from serde_json::Value to RawValue, which can
process arbitrarily deeply nested JSON content without recursion.
2018-09-23 14:12:10 -07:00
Alex Crichton d9534bf498 Only load `~/.cargo/config` for `cargo install`
This commit tweaks how configuration is loaded for `cargo install`, ensuring
that we only load configuration from `$HOME` instead of the current working
directory. This should make installations a little more consistent in that they
probably shouldn't cover project-local configuration but should respect global
configuration!

Closes #6025
2018-09-21 13:21:32 -07:00
Eh2406 40d9de46d6 Merge remote-tracking branch 'origin/master' into proptest 2018-09-19 22:04:11 -04:00
Alex Crichton bc942919e3 Use `Message::result_for` for better error messages
Recently fixed in the `curl` crate, this'll allow getting the full and complete
error message for each transfer instead of just the error code.
2018-09-18 11:33:18 -07:00
Alex Crichton a46df8fe7d Update the progress bar for parallel downloads
This is actually a super tricky problem. We don't really have the capacity for
more than one line of update-able information in Cargo right now, so we need to
squeeze a lot of information into one line of output for Cargo. The main
constraints this tries to satisfy are:

* At all times it should be clear what's happening. Cargo shouldn't just hang
  with no output when downloading a crate for a long time, a counter ideally
  needs to be decreasing while the download progresses.

* If a progress bar is shown, it shouldn't jump around. This ends up just being
  a surprising user experience for most. Progress bars should only ever
  increase, but they may increase at different speeds.

* Cargo has, currently, at most one line of output (as mentioned above) to pack
  information into. We haven't delved into fancier terminal features that
  involve multiple lines of update-able output.

* When downloading crates as part of `cargo build` (the norm) we don't actually
  know ahead of time how many crates are being downloaded. We rely on the
  calculation of unit dependencies to naturally feed into downloading more
  crates.

* Furthermore, once we decide to download a crate, we don't actually know how
  big it is! We have to wait for the server to tell us how big it is.

There doesn't really seem to be a great solution that satisfies all of these
constraints unfortunately. As a result this commit implements a relatively
conservative solution which should hopefully get us most of the way there. There
isn't actually a progress bar but rather Cargo prints that it's got N crates
left to download, and if it takes awhile it prints out that there are M bytes
remaining.

Unfortunately the progress is pretty choppy and jerky, not providing a smooth
UI. This appears to largely be because Cargo will synchronously extract
tarballs, which for large crates can cause a noticeable pause. Cargo's not
really prepared internally to perform this work on helper threads, but ideally
if it could do so it would improve the output quite a bit! (making it much
smoother and also able to account for the time tarball extraction takes).
2018-09-18 11:33:18 -07:00
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
Eh2406 17fe190aba update to the new version of proptest 2018-08-26 22:11:20 -04:00
Eh2406 ce1772c85a get working with minimal-versions 2018-08-21 16:43:06 -04:00
Eh2406 56a222cd30 a start on using proptest to fuzz the resolver 2018-08-21 14:10:14 -04: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
Alex Crichton de70bc01db Fold cargotest into testsuite
Now that there's only one crate with integration tests there's no need to have
this be a separate crate, yay!
2018-03-01 09:45:56 -08:00
Alex Crichton a85c917b6b Update git2 to 0.7.0
cc #5066
2018-02-27 06:24:26 -08:00
Aleksey Kladov e3eb2868d8 Revert "Seperate licenses with a `/`"
This reverts commit 1ddba76a0f.

OR is the more modern form
2018-02-26 21:19:26 +03:00
Alex Crichton c8c36e47de Bump to 0.27.0 2018-02-26 07:35:03 -08:00
Christopher Durham 1ddba76a0f
Seperate licenses with a `/` 2018-02-24 23:48:09 -05:00
André Rocha c2ff988c9f Reorganize integration tests as one crate with many modules. Issue #4867. 2018-02-21 13:33:51 -05:00
bors 2d42bcf41f Auto merge of #5033 - alexcrichton:update-deps, r=matklad
Update dependencies

Just a few major updates here and there
2018-02-12 22:32:11 +00:00
Alex Crichton b90bb7d6a8 Update dependencies
Just a few major updates here and there
2018-02-12 14:30:18 -08:00
Aleksey Kladov 7f3e86e069 Switch to lazycell from crate.io 2018-02-12 21:33:31 +03:00
Benno Fünfstück 330f32c58e Require at least version 0.1.9 of jobserver crate
There are some important fixes in jobserver >=0.1.8. With earlier
versions, it's possible for cargo to panic with a "failed to acquire
jobserver token" error, which can be very hard to track down.

Requiring the latest version of jobserver makes sure that no such error
can make it into downstream distributions.
2018-01-31 10:16:01 +01:00
Steven Fackler a540a39b84 Upgrade env_logger
0.4 depends on log 0.3 and so misses out on module names.
2018-01-17 09:40:00 -08:00
bors f60ece98c1 Auto merge of #4920 - wking:license-expression, r=matklad
Cargo.toml: Replace '/' with 'OR' in 'license'

Catch up with our recommendations from 7dee65fe (#4898), which deprecated `/` in favor of vanilla SPDX license expressions.

I've gone with the disjunctive `OR`, because the README has:

> Cargo is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).
2018-01-08 19:11:39 +00:00
W. Trevor King 4977c4c041 Cargo.toml: Replace '/' with 'OR' in 'license'
Catch up with our recommendations from 7dee65fe (src/doc/manifest: Pin
'license' to SPDX 2.1 expressions and the 2.4 list, 2018-01-04,
#4898), which deprecated '/' in favor of vanilla SPDX license
expressions.

I've gone with the disjunctive OR, because the README has:

> Cargo is primarily distributed under the terms of both the MIT
> license and the Apache License (Version 2.0).
2018-01-08 10:47:06 -08:00
Alex Crichton 5cca4e8c24 Leverage local links on git checkouts
This commit updates the handling of git checkouts from the database to use
hardlinks if possible, speeding up this operation for large repositories
significantly.

As a refresher, Cargo caches git repositories in a few locations to speed up
local usage of git repositories. Cargo has a "database" folder which is a bare
checkout of any git repository Cargo has cached historically. This database
folder contains effectively a bunch of databases for remote repos that are
updated periodically.

When actually building a crate Cargo will clone this database into a different
location, the checkouts folder. Each rev we build (ever) is cached in the
checkouts folder. This means that once a checkout directory is created it's
frozen for all of time.

This latter step is what this commit is optimizing. When checking out the
database onto the local filesystem at a particular revision. Previously we were
instructing libgit2 to fall back to a "git aware" transport which was
exceedingly slow on some systems for filesystem-to-filesystem transfers. This
optimization (we just forgot to turn it on in libgit2) is a longstanding one and
should speed this up significantly!

Closes #4604
2018-01-08 09:38:40 -08:00
Alex Crichton b3005021ad Bump to 0.26.0 2018-01-04 08:00:08 -08:00
bors 28f89fdfaf Auto merge of #4891 - MaloJaffre:compiler-docs-regression, r=alexcrichton
Try to fix a perf regression by updating log

Upgrade `log` to `0.4` in `cargo` and `cargotest`.

Cc: rust-lang/rust#47154.
2018-01-03 20:43:03 +00:00
Malo Jaffré 5731a732b8 Try to fix a perf regression by updating log
Upgrade `log` to `0.4` in `cargo` and `cargotest`.
2018-01-03 21:19:02 +01:00
bors 2316ca0b7d Auto merge of #4877 - steffengy:master, r=alexcrichton
migrate to winapi 0.3
2018-01-03 19:47:09 +00:00
Alex Crichton 64828ba9ca Touch up style of Windows imports 2018-01-03 11:25:28 -08:00
Bastien Orivel 98eec2ce0f Bump hex to 0.3 2018-01-02 20:35:32 +01:00
Bastien Orivel ece662ca9b Bump dependencies
Those dependencies didn't need any code change
2018-01-02 12:08:44 +01:00
Steffen Butzer 285a1983f8 migrate to winapi 0.3 2017-12-30 18:39:42 +01:00
Malo Jaffré 33fbc02424 Upgrade flate2 crate to 1.0
Unblocks rust#46278.
2017-12-29 15:37:22 +01:00
Alex Crichton 37cffbe0a3 Start migration to the `failure` crate
This commit is the initial steps to migrate Cargo's error handling from the
`error-chain` crate to the `failure` crate. This is intended to be a low-cost
(in terms of diff) transition where possible so it's note "purely idiomatic
`failure` crate" just yet.

The `error-chain` dependency is dropped in this commit and Cargo now canonically
uses the `Error` type from the `failure` crate. The main last remnant of
`error-chain` is a custom local extension trait to use `chain_err` instead of
`with_context`. I'll try to follow up with a commit that renames this later but
I wanted to make sure everything worked first! (and `chain_err` is used
practically everywhere).

Some minor tweaks happened in the tests as I touched up a few error messages
here and there but overall the UI of Cargo should be exactly the same before and
after this commit.
2017-12-18 17:48:36 -08:00
Aidan Hobson Sayers edb02dcf9b Remove overflow checks to eliminate rust build warnings
Although the checks are desirable, they cause warnings in the rust build
(due to workspaces) which could cause needless concern. The checks
aren't too important, so just disable them.
2017-12-14 21:14:32 +00:00
Aidan Hobson Sayers 1c3bba34db Don't incorrectly compute cur from binary heap 2017-12-05 21:08:40 +00:00
Alex Crichton 2aed91fc18 Bump to 0.25.0 2017-11-30 15:17:35 -08:00
Alex Crichton 5c9665f41c Delete Cargo.lock from this repo
There's now a lock file upstream in rust-lang/rust so the one here isn't
actually used, and otherwise this crate is used as a dependency so the lock file
isn't respected anyway!
2017-10-18 07:43:15 -07:00
Alex Crichton 9b8efd18e9 Bump to 0.24.0
It's that time of the year again!
2017-10-15 08:30:11 -07:00
equal-l2 4acb69897b Use crypto-hash to calculate SHA256 2017-09-27 22:27:55 +09:00
Alex Crichton 4c077033dd Update dependencies
Just a usual `cargo update` plus moving over some major versions
2017-09-05 15:29:07 -07:00
Alex Crichton 1e54d9efa3 Bump Cargo to 0.23.0 2017-08-28 07:45:43 -07:00
bors 8720d63bc1 Auto merge of #4390 - alexcrichton:read-hard-links, r=matklad
Use `same-file` to avoid unnecessary hard links

This is targeted at removing the need for a workaround in rust-lang/rust#39518,
allowing the main rust build system to move back to hard links which should be
much more efficient.
2017-08-10 09:04:21 +00:00
Kornel 8e0a7caddf Exclude target directory from Time Machine
Temporary/derived files outside dedicated system directories should be explicitly excluded from backups to prevent undesirable bloat and churn.
2017-08-10 01:42:32 +01:00
Alex Crichton 599db09980 Use `same-file` to avoid unnecessary hard links
This is targeted at removing the need for a workaround in rust-lang/rust#39518,
allowing the main rust build system to move back to hard links which should be
much more efficient.
2017-08-09 17:22:34 -07:00
Guillaume Gomez 6f23ce5cc2 Update to rc error chain 2017-07-28 21:12:05 +02:00
Kevin Yap aa4f86fcd4 Convert Options struct into unit struct
Unit struct support was added in Docopt 0.8.1 via
docopt/docopt.rs#217. Fixes #4174.
2017-07-22 13:44:47 -07:00
Alex Crichton e8a7132805 Bump to 0.22.0 and update deps 2017-07-20 08:35:07 -07:00
Brian Anderson fdb9f1bd1d Replace homedir definition with home crate 2017-07-18 17:25:31 -07:00
Behnam Esfahbod c072ba4242 [sources/path] Add gitignore-like pattern matching and warn on mismatches
Add gitignore-like pattern matching logic to `list_files()` and throw
warnings for paths getting different inclusion/exclusion results from
the old and the new methods.

Migration Tracking: <https://github.com/rust-lang/cargo/issues/4268>
2017-07-18 00:14:14 -06:00
Alex Crichton f429be4f4c Don't set MAKEFLAGS for build scripts
Closes #4156
Closes rust-lang/rust#42635
2017-07-12 14:15:56 -07:00
Alex Crichton 9629f99dd0 Use the `atty` crate for TTY detection
This is more robust in the face of msys terminals and otherwise helps share more
dependencies!

Closes #4166
2017-06-15 08:08:35 -07:00
Alex Crichton f8fb0a0228 Migrate from the `term` crate to `termcolor`
The API of `termcolor` fits what the system gives us much more nicely and should
be well battle-tested from ripgrep. Additionally we don't really need huge
terminfo parsers, that wasn't every really the intention of the color support
here.
2017-06-13 14:28:37 -07:00
Andronik Ordian 10373f4039 Drop rustc-serialize dependency 2017-06-09 00:56:48 +03:00
Alex Crichton 90299a66f2 Bump to 0.21.0
We're working on the next version now!
2017-06-08 09:08:01 -07:00
Marco A L Barbosa 728694abf0 Bump jobserver to 0.1.4 2017-06-05 14:15:40 -03:00
Alex Crichton 74777c1274 Remove more allocatoins in index querying
Removing some allocations arounds the stored hashes by having nested hash maps
instead of tuple keys. Also remove an intermediate array when parsing
dependencies through a custom implementation of `Deserialize`. While this
doesn't make this code path blazingly fast it definitely knocks it down in the
profiles below other higher-value targets.
2017-06-05 07:36:44 -07:00
Alex Crichton cbf25a9b0a Add a GNU make jobserver implementation to Cargo
This commit adds a GNU make jobserver implementation to Cargo, both as a client
of existing jobservers and also a creator of new jobservers. The jobserver is
actually just an IPC semaphore which manifests itself as a pipe with N bytes
of tokens on Unix and a literal IPC semaphore on Windows. The rough protocol
is then if you want to run a job you read acquire the semaphore (read a byte on
Unix or wait on the semaphore on Windows) and then you release it when you're
done.

All the hairy details of the jobserver implementation are housed in the
`jobserver` crate on crates.io instead of Cargo. This should hopefully make it
much easier for the compiler to also share a jobserver implementation
eventually.

The main tricky bit here is that on Unix and Windows acquiring a jobserver token
will block the calling thread. We need to either way for a running job to exit
or to acquire a new token when we want to spawn a new job. To handle this the
current implementation spawns a helper thread that does the blocking and sends a
message back to Cargo when it receives a token. It's a little trickier with
shutting down this thread gracefully as well but more details can be found in
the `jobserver` crate.

Unfortunately crates are unlikely to see an immediate benefit of this once
implemented. Most crates are run with a manual `make -jN` and this overrides the
jobserver in the environment, creating a new jobserver in the sub-make. If the
`-jN` argument is removed, however, then `make` will share Cargo's jobserver and
properly limit parallelism.

Closes #1744
2017-06-02 08:06:30 -07:00
jluner 7f6dbc14da Resolve upstream updates to referenced crates 2017-05-27 23:50:55 -05:00
Alex Crichton 0ceab8e3c1 Update a slew of dependencies and such
Standard bug fixes and otherwise keeping up to date
2017-05-27 17:21:42 -07:00
jluner e95044e313 Add error-chain errors
Convert CargoResult, CargoError into an implementation provided by error-chain. The previous is_human machinery is mostly removed; now errors are displayed unless of the Internal kind, verbose mode will print all errors.
2017-05-24 21:14:04 -05:00