Giles Cope [Fri, 9 Mar 2018 18:32:28 +0000 (18:32 +0000)]
Clippy complains about unused in derived code.
Giles Cope [Thu, 8 Mar 2018 18:37:30 +0000 (18:37 +0000)]
Switch to exhaustive matches in tests.
Giles Cope [Wed, 7 Mar 2018 22:56:47 +0000 (22:56 +0000)]
As pointed out by Jacob, we can display the ordered cycle in the error message.
Giles Cope [Tue, 6 Mar 2018 09:30:37 +0000 (09:30 +0000)]
Neater error message. Tests now check the cycle is output.
Giles Cope [Tue, 6 Mar 2018 00:41:21 +0000 (00:41 +0000)]
Error message for package cycles lists the packages in the cycle.
bors [Sun, 4 Mar 2018 21:16:16 +0000 (21:16 +0000)]
Auto merge of #5119 - alexcrichton:no-clone-index-in-tests, r=matklad
Update a test to not clone the real index
A local index should work ok!
Alex Crichton [Sun, 4 Mar 2018 20:51:31 +0000 (12:51 -0800)]
Update a test to not clone the real index
A local index should work ok!
bors [Sun, 4 Mar 2018 20:47:56 +0000 (20:47 +0000)]
Auto merge of #5118 - Eh2406:more_rc, r=alexcrichton
use more Rc in the part of resolver that gets cloned a lot
In a test on https://github.com/rust-lang/cargo/issues/4810#issuecomment-
357553286
Before we got to
1700000 ticks in ~(82 to 97) sec
After we got to
1700000 ticks in ~(63 to 67) sec
Eh2406 [Sun, 4 Mar 2018 02:33:23 +0000 (21:33 -0500)]
use more Rc in the part of resolver that gets cloned a lot
In a test on https://github.com/rust-lang/cargo/issues/4810#issuecomment-
357553286
Before we got to
1700000 ticks in ~(82 to 97) sec
After we got to
1700000 ticks in ~(63 to 67) sec
bors [Sat, 3 Mar 2018 21:32:24 +0000 (21:32 +0000)]
Auto merge of #5112 - Eh2406:cache_queries, r=alexcrichton
Cache the query result.
Small performance gain.
In a test on https://github.com/rust-lang/cargo/issues/4810#issuecomment-
357553286
Before we got to
1700000 ticks in ~97 sec
After we got to
1700000 ticks in ~92 sec. I just reran and got ~82, so it seems to be unstable.
And query disappears from the flame graph
Eh2406 [Sat, 3 Mar 2018 17:49:15 +0000 (12:49 -0500)]
Use `HashMap` insted of `BTreeMap`
Eh2406 [Sat, 3 Mar 2018 16:17:05 +0000 (11:17 -0500)]
`Context` no longer needs replacements nor its lifetime
Eh2406 [Sat, 3 Mar 2018 15:56:57 +0000 (10:56 -0500)]
Make a `RegistryQueryer` to own the cache
bors [Fri, 2 Mar 2018 23:37:29 +0000 (23:37 +0000)]
Auto merge of #5110 - alexcrichton:reset-harder, r=matklad
Try a lot harder to recover corrupt git repos
We've received a lot of intermittent bug reports historically about corrupt git
repositories. These inevitably happens as Cargo is ctrl-c'd or for whatever
other reason, and to provide a better user experience Cargo strives to
automatically handle these situations by blowing away the old checkout for a new
update.
This commit adds a new test which attempts to pathologically corrupt a git
database and checkout in an attempt to expose bugs in Cargo. Sure enough there
were some more locations that we needed to handle gracefully for corrupt git
checkouts. Notable inclusions were:
* The `fetch` operation in libgit2 would fail due to corrupt references. This
starts by adding an explicit whitelist for classes of errors coming out of
`fetch` to auto-retry by blowing away the repository. We need to be super
careful here as network errors commonly come out of this function and we don't
want to too aggressively re-clone.
* After a `fetch` succeeded a repository could fail to actual resolve a
git reference to the actual revision we want. This indicated that we indeed
needed to blow everything away and re-clone entirely again.
* When creating a checkout from a database the `reset` operation might fail due
to a corrupt local database of the checkout itself. If this happens we needed
to just blow it away and try again.
There's likely more lurking situations where we need to re-clone but I figure we
can discover those over time.
Alex Crichton [Fri, 2 Mar 2018 17:44:47 +0000 (09:44 -0800)]
Try a lot harder to recover corrupt git repos
We've received a lot of intermittent bug reports historically about corrupt git
repositories. These inevitably happens as Cargo is ctrl-c'd or for whatever
other reason, and to provide a better user experience Cargo strives to
automatically handle these situations by blowing away the old checkout for a new
update.
This commit adds a new test which attempts to pathologically corrupt a git
database and checkout in an attempt to expose bugs in Cargo. Sure enough there
were some more locations that we needed to handle gracefully for corrupt git
checkouts. Notable inclusions were:
* The `fetch` operation in libgit2 would fail due to corrupt references. This
starts by adding an explicit whitelist for classes of errors coming out of
`fetch` to auto-retry by blowing away the repository. We need to be super
careful here as network errors commonly come out of this function and we don't
want to too aggressively re-clone.
* After a `fetch` succeeded a repository could fail to actual resolve a
git reference to the actual revision we want. This indicated that we indeed
needed to blow everything away and re-clone entirely again.
* When creating a checkout from a database the `reset` operation might fail due
to a corrupt local database of the checkout itself. If this happens we needed
to just blow it away and try again.
There's likely more lurking situations where we need to re-clone but I figure we
can discover those over time.
Eh2406 [Fri, 2 Mar 2018 22:56:36 +0000 (17:56 -0500)]
Cache the query result.
In a test on https://github.com/rust-lang/cargo/issues/4810#issuecomment-
357553286
Before we got to
1700000 ticks in ~97 sec
After we got to
1700000 ticks in ~92 sec
And query disappears from the flame graph
bors [Fri, 2 Mar 2018 20:42:25 +0000 (20:42 +0000)]
Auto merge of #5111 - ehuss:bashc-toolchains, r=alexcrichton
Support +toolchain rustup override in bash completions.
Fixes #5107
Eric Huss [Fri, 2 Mar 2018 19:45:16 +0000 (11:45 -0800)]
Support +toolchain rustup override in bash completions.
Fixes #5107
bors [Fri, 2 Mar 2018 18:43:11 +0000 (18:43 +0000)]
Auto merge of #5095 - tdbgamer:master, r=matklad
Issue #5087
* remove Workspace::current_manifest
* remove incorrect logging
* move empty check to Packages::into_package_id_specs
* add test case mentioned in issue
bors [Fri, 2 Mar 2018 15:06:13 +0000 (15:06 +0000)]
Auto merge of #5104 - Eh2406:bug_fix, r=alexcrichton
missed this important bug
In the PR #5000 I finished and we merged yesterday I missed a bug and left in an outdated comment.
@alexcrichton
Eh2406 [Fri, 2 Mar 2018 13:49:42 +0000 (08:49 -0500)]
This test should pass if we have tried to `update registry` evan if the command otherwise fails
Eh2406 [Fri, 2 Mar 2018 02:44:02 +0000 (21:44 -0500)]
get ci green; don't clone more than we need
Eh2406 [Fri, 2 Mar 2018 02:05:22 +0000 (21:05 -0500)]
missed this important bug
Timothy Bess [Thu, 1 Mar 2018 22:17:06 +0000 (17:17 -0500)]
Merge remote-tracking branch 'upstream/master'
Timothy Bess [Thu, 1 Mar 2018 22:14:57 +0000 (17:14 -0500)]
Issue #5087
* change match to if
bors [Thu, 1 Mar 2018 21:49:10 +0000 (21:49 +0000)]
Auto merge of #5100 - alexcrichton:better-dep-ordering, r=matklad
Improve Cargo's scheduling of builds
Historically Cargo has been pretty naive about scheduling builds, basically just
greedily scheduling as much work as possible. As pointed out in #5014, however,
this isn't guaranteed to always have the best results. If we've got a very deep
dependency tree that would otherwise fill up our CPUs Cargo should ideally
schedule these dependencies first. That way when we reach higher up in the
dependency tree we should have more work available to fill in the cracks if
there's spare cpus.
Closes #5014
Alex Crichton [Thu, 1 Mar 2018 06:04:54 +0000 (22:04 -0800)]
Improve Cargo's scheduling of builds
Historically Cargo has been pretty naive about scheduling builds, basically just
greedily scheduling as much work as possible. As pointed out in #5014, however,
this isn't guaranteed to always have the best results. If we've got a very deep
dependency tree that would otherwise fill up our CPUs Cargo should ideally
schedule these dependencies first. That way when we reach higher up in the
dependency tree we should have more work available to fill in the cracks if
there's spare cpus.
Closes #5014
bors [Thu, 1 Mar 2018 21:27:17 +0000 (21:27 +0000)]
Auto merge of #5000 - Eh2406:i4347, r=alexcrichton
backtrack if can not activate
This is a fix for #4347
Unfortunately this too regressed error messages for the case that you specified a dependency feature that does not exist.
@alexcrichton advice on improving the message?
bors [Thu, 1 Mar 2018 19:48:18 +0000 (19:48 +0000)]
Auto merge of #5103 - alexcrichton:no-hamcrest, r=matklad
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.
Alex Crichton [Thu, 1 Mar 2018 18:14:17 +0000 (10:14 -0800)]
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.
Eh2406 [Thu, 1 Mar 2018 18:12:27 +0000 (13:12 -0500)]
fix cause and the error messages
Alex Crichton [Thu, 1 Mar 2018 17:45:56 +0000 (09:45 -0800)]
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!
Eh2406 [Thu, 1 Mar 2018 16:25:46 +0000 (11:25 -0500)]
One more todo to fix
Eh2406 [Tue, 27 Feb 2018 21:42:39 +0000 (16:42 -0500)]
fix the todo's
needs a test where we have an activation_error the then try activate something that dose not work and backtrack to where we had the activation_error then:
- Hit fast backtracking that go past the crate with the missing features
- Or give a bad error message that does not mention the activation_error.
The test will pass, but there is code that is not yet justified by tests
Eh2406 [Tue, 27 Feb 2018 16:08:11 +0000 (11:08 -0500)]
WIP: make it recurs if activation fails
Eh2406 [Tue, 27 Feb 2018 15:08:19 +0000 (10:08 -0500)]
add a test for cargo/issues/4347
bors [Wed, 28 Feb 2018 22:07:53 +0000 (22:07 +0000)]
Auto merge of #5093 - alexcrichton:include-cargo-lock, r=matklad
Package lock files in published crates
Previously we had logic to explicitly skip lock files but there's actually a
good case to read these from crates.io (#2263) so let's do so!
Closes #2263
Alex Crichton [Tue, 27 Feb 2018 15:56:04 +0000 (07:56 -0800)]
Package lock files in published crates
Previously we had logic to explicitly skip lock files but there's actually a
good case to read these from crates.io (#2263) so let's do so!
Closes #2263
Timothy Bess [Wed, 28 Feb 2018 21:43:08 +0000 (16:43 -0500)]
Issue #5087
* targeted error message for virtual manifests
* assert correct error message
Timothy Bess [Wed, 28 Feb 2018 21:17:33 +0000 (16:17 -0500)]
Revert "Issue #5087 * fix broken test case"
This reverts commit
17572b8
Timothy Bess [Wed, 28 Feb 2018 21:12:34 +0000 (16:12 -0500)]
Issue #5087
* fix broken test case
bors [Wed, 28 Feb 2018 15:20:30 +0000 (15:20 +0000)]
Auto merge of #5097 - matklad:end-of-tls-saga-hopefully, r=alexcrichton
Revert "Warn Windows 7 users about old TLS"
We now have upgraded libgit2 version, so Cargo would use TLS 1.2
on windows unconditionally. Note that even *unpatched* windows 7
supports TLS 1.2.
@retep998, you've originally written that
>TLS 1.2 support for Windows 7 still requires a rather recent patch and so even if we do fix that, we should still keep this error message because some people use Windows 7 with automatic updates disabled.
However, it looks like Windows 7 **does** support TLS 1.2 out of the box, and the update is required to enable the use of TLS 1.2 by default:
https://github.com/libgit2/libgit2/issues/4546#issuecomment-
368909158
My own testing on a random win 7 virtual box confirms this.
closes https://github.com/rust-lang/cargo/issues/5066
Aleksey Kladov [Wed, 28 Feb 2018 06:39:41 +0000 (09:39 +0300)]
Revert "Warn Windows 7 users about old TLS"
We now have upgraded libgit2 version, so Cargo would use TLS 1.2
on windows unconditionally. Note that even *unpatched* windows 7
supports TLS 1.2
Timothy Bess [Wed, 28 Feb 2018 02:34:04 +0000 (21:34 -0500)]
Issue #5087
* remove Workspace::current_manifest
* remove incorrect logging
* move empty check to Packages::into_package_id_specs
* add test case mentioned in issue
Alex Crichton [Tue, 27 Feb 2018 15:50:05 +0000 (07:50 -0800)]
Respect lock files in crates.io crates
Currently Cargo doesn't publish lock files in crates.io crates but we'll
eventually be doing so, so this changes Cargo to recognize `Cargo.lock` when
it's published to crates.io as use it as the basis for resolution during `cargo
install`.
cc #2263
bors [Tue, 27 Feb 2018 14:24:37 +0000 (14:24 +0000)]
Auto merge of #5091 - alexcrichton:update-git2, r=matklad
Update git2 to 0.7.0
cc #5066
Alex Crichton [Tue, 27 Feb 2018 13:14:38 +0000 (05:14 -0800)]
Update git2 to 0.7.0
cc #5066
bors [Tue, 27 Feb 2018 04:44:41 +0000 (04:44 +0000)]
Auto merge of #5070 - Eh2406:clippy, r=alexcrichton
Some Clippy suggestions
This is just some suggestions from Clippy and intellij rust.
Clippy still has a lot to say, but this is some of the simple things.
bors [Tue, 27 Feb 2018 04:24:19 +0000 (04:24 +0000)]
Auto merge of #5059 - tobywhughes:master, r=alexcrichton
Clean with --verbose now prints path of what is being removed.
Added verbose output for the clean command. Simply takes whatever is passed into the rm_rf() function and outputs "Removing /whatever/the/path/to/remove/is"
[Issue this is being used for](https://github.com/rust-lang/cargo/issues/5056)
Eh2406 [Tue, 27 Feb 2018 02:46:59 +0000 (21:46 -0500)]
one more use of entry
Eh2406 [Tue, 27 Feb 2018 02:02:39 +0000 (21:02 -0500)]
some simple clippy things V2
bors [Mon, 26 Feb 2018 23:50:53 +0000 (23:50 +0000)]
Auto merge of #5081 - matklad:document-not-all-the-things, r=alexcrichton
Support --exclude option for `cargo doc`
I think this should have been implemented when the feature was added for
other commands. Probably just an oversight.
cc https://github.com/rust-lang/cargo/pull/4031
r? @alexcrichton
Toby Hughes [Mon, 26 Feb 2018 23:36:23 +0000 (15:36 -0800)]
Merge remote-tracking branch 'upstream/master'
Toby Hughes [Mon, 26 Feb 2018 23:33:23 +0000 (15:33 -0800)]
Added tests for clean with verbose output
Eh2406 [Sat, 24 Feb 2018 04:06:10 +0000 (23:06 -0500)]
use entry to not hash twice thanks clippy
(cherry picked from commit
de9a7b9)
Eh2406 [Fri, 23 Feb 2018 23:27:53 +0000 (18:27 -0500)]
intellij rust suggested fixes
(cherry picked from commit
24836e9)
bors [Mon, 26 Feb 2018 22:28:49 +0000 (22:28 +0000)]
Auto merge of #5083 - matklad:Cargo-the-tool-1.0, r=alexcrichton
Make cargo-the-binary version the same as the Rust version
Closes #4211 which seems stuck :-)
Soooo, this is the simplest possible fix to this problem:
```
~/projects/cargo Cargo-the-tool-1.0
λ rustc --version
rustc 1.24.0 (
4d90ac38c 2018-02-12)
~/projects/cargo Cargo-the-tool-1.0
λ cargo --version
cargo 0.25.0 (
8c93e0895 2018-02-01)
```
It makes `cargo --version` to print the corresponding Rust version (with possibly cargo-specific patch number), while keeping the library version the same as today.
On the one hand, this is horrible. On the other hand, it seems to do the job? In the long term, it would be cool skip one version bump for the library, so that `0.x` corresponds to `1.x`.
cc @rust-lang/cargo
I am not sure that this is good idea, the implementation certainly feels horrible :)
bors [Mon, 26 Feb 2018 19:59:27 +0000 (19:59 +0000)]
Auto merge of #5069 - matklad:win7-y-u-no-tls, r=alexcrichton
Warn Windows 7 users about old TLS
An eyepatch for https://github.com/rust-lang/cargo/issues/5066.
@retep998 what would the best way to check for windows 7 specifically? Currently I use just `#[cfg(windows)]`, which might give false positives on 8 and 10.
Aleksey Kladov [Mon, 26 Feb 2018 19:48:31 +0000 (22:48 +0300)]
Make cargo-the-binary version the same as the Rust version
Closes #4211
bors [Mon, 26 Feb 2018 19:10:55 +0000 (19:10 +0000)]
Auto merge of #5080 - matklad:hope-this-wont-be-re-reverted, r=alexcrichton
Revert "Seperate licenses with a `/`"
This reverts commit
1ddba76a0f5f83884d20be97f49452f9dd1897f1.
OR is the more modern form :rofl:
r? @alexcrichton
Aleksey Kladov [Mon, 26 Feb 2018 18:39:25 +0000 (21:39 +0300)]
Support --exclude option for `cargo doc`
I think this should have been implemented when the feature was added for
other commands. Probably just an oversight.
Aleksey Kladov [Mon, 26 Feb 2018 18:19:26 +0000 (21:19 +0300)]
Revert "Seperate licenses with a `/`"
This reverts commit
1ddba76a0f5f83884d20be97f49452f9dd1897f1.
OR is the more modern form
Aleksey Kladov [Mon, 26 Feb 2018 17:41:22 +0000 (20:41 +0300)]
Warn about TLS for github specifically
bors [Mon, 26 Feb 2018 15:55:05 +0000 (15:55 +0000)]
Auto merge of #5079 - alexcrichton:bump, r=alexcrichton
Bump to 0.27.0
Alex Crichton [Mon, 26 Feb 2018 15:35:03 +0000 (07:35 -0800)]
Bump to 0.27.0
bors [Mon, 26 Feb 2018 15:31:55 +0000 (15:31 +0000)]
Auto merge of #5075 - ehuss:report-test-ws, r=matklad
Fix test error hint in a workspace.
This adds "-p NAME" to the hint on how to re-run a test when it fails if it is
inside a workspace.
Fixes #5053
Eric Huss [Mon, 26 Feb 2018 00:51:48 +0000 (16:51 -0800)]
Fix test error hint in a workspace.
This adds "-p NAME" to the hint on how to re-run a test when it fails if it is
inside a workspace.
Fixes #5053
bors [Sun, 25 Feb 2018 12:22:31 +0000 (12:22 +0000)]
Auto merge of #5074 - CAD97:patch-1, r=alexcrichton
Separate licenses with a `/` instead of ` OR `
It's what we tell others to do.
https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata
> ```toml
> # This is a string description of the license for this package. Currently
> # crates.io will validate the license provided against a whitelist of known
> # license identifiers from http://spdx.org/licenses/. Multiple licenses can be
> # separated with a `/`.
> license = "..."
> ```
Noted [here](https://github.com/TeXitoi/structopt/pull/71#discussion_r170423582).
This should either use `/` or a note should be added that ` OR ` is allowed as a combination operator.
bors [Sun, 25 Feb 2018 12:00:24 +0000 (12:00 +0000)]
Auto merge of #5044 - Eh2406:PeekAtRemainingCandidates, r=alexcrichton
make RemainingCandidates::next peekable.
`candidates.next` always came with a `candidates.clone().next(prev_active).is_ok` so let's just make that part of `next`. no `clone` needed.
Aleksey Kladov [Fri, 23 Feb 2018 19:02:00 +0000 (22:02 +0300)]
Warn Windows 7 users about old TLS
An eyepatch for https://github.com/rust-lang/cargo/issues/5066.
Christopher Durham [Sun, 25 Feb 2018 04:48:09 +0000 (23:48 -0500)]
Seperate licenses with a `/`
Eh2406 [Sun, 25 Feb 2018 01:23:49 +0000 (20:23 -0500)]
Merge remote-tracking branch 'origin/master' into PeekAtRemainingCandidates
# Conflicts:
# src/cargo/core/resolver/mod.rs
Eh2406 [Sun, 25 Feb 2018 00:39:00 +0000 (19:39 -0500)]
only have one place we push to backtrack_stack
Eh2406 [Sat, 24 Feb 2018 21:26:47 +0000 (16:26 -0500)]
formatting
bors [Sat, 24 Feb 2018 20:46:55 +0000 (20:46 +0000)]
Auto merge of #4978 - Eh2406:master, r=alexcrichton
Only allow one of each links attribute in resolver
This is a start on fixing the `links` part of #4902. It needs code that adds the links attribute to the index. But, I wanted to get feedback.
bors [Sat, 24 Feb 2018 19:34:52 +0000 (19:34 +0000)]
Auto merge of #5061 - ehuss:git-error-auth, r=alexcrichton
Display git errors during authentication.
Certain git errors during authentication were being converted to internal errors which meant that they are only seen if you pass `--verbose`. This may not be obvious, and many of these messages are helpful for diagnosing git errors. This change makes these errors always be displayed.
Fixes #5035.
Note: Some of the git errors are currently unhelpful. Once Cargo has updated git2-rs to include alexcrichton/git2-rs#298, these errors will improve. (@alexcrichton, I can make a PR to update Cargo for the changes in git2 if you'd like).
I'm uncertain if this is a good solution, since the error messages in some cases are a little verbose (such as showing `class=...`). Here is a sample of what some of the messages look like:
<details><summary>Error Message Examples</summary>
<p>
Example of the git message shown below the "attempted yadda yadda" message.
Scenario | Message
---------|--------
No ssh-agent, multiple usernames | `error authenticating: ; class=Ssh (23)`
| | †`error authenticating: no auth sock variable; class=Ssh (23)`
No ssh-agent, one username | `an unknown git error occurred`
| | †`error authenticating: no auth sock variable; class=Ssh (23)`
Incorrect ssh-agent setup | `error authenticating: failed connecting with agent; class=Ssh (23)`
ssh-agent no keys, one username | `an unknown git error occurred`
| | †`failed to acquire username/password from local configuration`
ssh-agent no keys, multiple usernames | `error authenticating: ; class=Ssh (23)`
| | †`no authentication available`
auth success, bad path | `fatal: '/path/to/repo/' does not appear to be a git repository; class=Ssh (23); code=Eof (-20)`
| | ‡`ERROR: Repository not found.; class=Ssh (23); code=Eof (-20)`
bad username | `an unknown git error occurred`
| | †`failed to acquire username/password from local configuration`
| | ‡`error authenticating: Username/PublicKey combination invalid; class=Ssh (23)`
† - Messages once git2-rs is updated.
‡ - Github message
</p>
</details>
bors [Fri, 23 Feb 2018 19:25:53 +0000 (19:25 +0000)]
Auto merge of #5067 - tecywiz121:noting-nothing, r=matklad
Fix a small typo (nothing -> noting)
Sam Wilson [Fri, 23 Feb 2018 15:10:23 +0000 (10:10 -0500)]
Fix a small typo (nothing -> noting)
bors [Thu, 22 Feb 2018 21:49:08 +0000 (21:49 +0000)]
Auto merge of #5064 - Eh2406:fix_test, r=matklad
fix a missing test, this was missed in the rebase of #5063
3 test did not get moved. in #5063.
Eh2406 [Thu, 22 Feb 2018 16:37:51 +0000 (11:37 -0500)]
fix a missing test, this was missed in the rebase of #5063
Eric Huss [Wed, 21 Feb 2018 16:52:24 +0000 (08:52 -0800)]
Fix appveyor failure, messages differ by platform.
Eric Huss [Wed, 21 Feb 2018 03:30:00 +0000 (19:30 -0800)]
Expose git errors during authentication.
Eh2406 [Wed, 21 Feb 2018 20:41:48 +0000 (15:41 -0500)]
Merge remote-tracking branch 'origin/master' into links
Eh2406 [Thu, 15 Feb 2018 22:36:30 +0000 (17:36 -0500)]
make RemainingCandidates::next peekable.
`candidates.next` always came with a `candidates.clone().next(prev_active).is_ok` so lets just make that part of `next`. no `clone` needed.
bors [Wed, 21 Feb 2018 19:56:27 +0000 (19:56 +0000)]
Auto merge of #5063 - Eh2406:TestssuiteV3, r=matklad
Reorganize integration tests as one crate with many modules. Issue #4867. Rebased V3
This is an automatic rebase of @rochamatcomp's work in #5022, as requested in [#5038](https://github.com/rust-lang/cargo/pull/5038#issuecomment-
365200227).
I take no credit for the changes; I just wanted faster test for my work. :-)
Eh2406 [Wed, 21 Feb 2018 19:26:29 +0000 (14:26 -0500)]
fix winapi import
André Rocha [Thu, 8 Feb 2018 16:30:58 +0000 (17:30 +0100)]
Adding cargo.rs file tests as cargo_command.rs.
André Rocha [Thu, 8 Feb 2018 00:13:17 +0000 (01:13 +0100)]
Reorganize integration tests as one crate with many modules. Issue #4867.
Toby Hughes [Tue, 20 Feb 2018 01:18:38 +0000 (17:18 -0800)]
Clean with --verbose now prints path of what is being removed.
bors [Mon, 19 Feb 2018 22:31:29 +0000 (22:31 +0000)]
Auto merge of #5058 - sfackler:patch-2, r=Mark-Simulacrum
Update default codegen-units
It's been 16 since rustc 1.24.
Steven Fackler [Mon, 19 Feb 2018 22:29:48 +0000 (14:29 -0800)]
Update default codegen-units
It's been 16 since rustc 1.24.
bors [Mon, 19 Feb 2018 21:39:17 +0000 (21:39 +0000)]
Auto merge of #5051 - cardoe:fix-doc-instructions, r=matklad
update contributing to show how to build the docs
The contributing guide referenced a script that was deleted in
1271bb4de0c0 so it wasn't possible to follow the contributing guide
successfully prior to contributing doc improvements.
bors [Mon, 19 Feb 2018 21:09:48 +0000 (21:09 +0000)]
Auto merge of #5041 - pwoolcoc:display-path-to-custom-commands-when-verbose, r=matklad
When -v is passed with --list, display path to custom commands
With this change, output of `cargo --list` changes slightly when 1 or more `-v` flags are passed:
```
± ./target/debug/cargo --list -v
Installed Commands:
add /path/to/home/.cargo/bin/cargo-add
bench
build
canoe /path/to/home/.cargo/bin/cargo-canoe
check
clean
do /path/to/home/.cargo/bin/cargo-do
doc
fetch
fmt /path/to/home/.cargo/bin/cargo-fmt
...
```
bors [Mon, 19 Feb 2018 20:21:26 +0000 (20:21 +0000)]
Auto merge of #4953 - alexcrichton:rename-via-as, r=matklad
Implement renaming dependencies in the manifest
This commit implements a new unstable feature for manifests which allows
renaming a crate when depending on it. For example you can do:
```toml
cargo-features = ["dependencies-as"]
...
[dependencies]
foo = "0.1"
bar = { version = "0.1", registry = "custom", package = "foo" }
baz = { git = "https://github.com/foo/bar", package = "foo" }
```
Here three crates will be imported but they'll be made available to the Rust
source code via the names `foo` (crates.io), `bar` (the custom registry), and
`baz` (the git dependency). The *package* name, however, will be `foo` for all
of them. In other words the git repository here would be searched for a crate
called `foo`. For example:
```rust
extern crate foo; // crates.io
extern crate bar; // registry `custom`
extern crate baz; // git repository
```
The intention here is to enable a few use cases:
* Enable depending on the same named crate from different registries
* Allow depending on multiple versions of a crate from one registry
* Removing the need for `extern crate foo as bar` syntactically in Rust source
Currently I don't think we're ready to stabilize this so it's just a nightly
feature, but I'm hoping we can continue to iterate on it!
cc #1311
bors [Mon, 19 Feb 2018 19:51:32 +0000 (19:51 +0000)]
Auto merge of #5050 - cardoe:add-dependency-info, r=matklad
doc: add explicit example with ^ and leading 0
Since the leading 0 is treated a bit special, its worth it to have an
explicit example to match the above example of the major version being >
0.
Doug Goldstein [Sun, 18 Feb 2018 04:41:32 +0000 (22:41 -0600)]
update contributing to show how to build the docs
The contributing guide referenced a script that was deleted in
1271bb4de0c0 so it wasn't possible to follow the contributing guide
successfully prior to contributing doc improvements.
Doug Goldstein [Sun, 18 Feb 2018 04:23:27 +0000 (22:23 -0600)]
doc: add explicit example with ^ and leading 0
Since the leading 0 is treated a bit special, its worth it to have an
explicit example to match the above example of the major version being >
0.
Eh2406 [Thu, 15 Feb 2018 03:28:59 +0000 (22:28 -0500)]
better error messages
Paul Woolcock [Wed, 14 Feb 2018 17:27:19 +0000 (12:27 -0500)]
When -v is passed with --list, display path to custom commands
bors [Wed, 14 Feb 2018 16:52:47 +0000 (16:52 +0000)]
Auto merge of #5037 - Eh2406:conflict_tracking, r=alexcrichton
Conflict tracking
This is an alternative implementation of #4834. This is slower but hopefully more flexible and clearer. The idea is to keep a list of `PackageId`'s that have caused us to skip a `Candidate`. Then we can use the list when we are backtracking if any items in our list have not been activated then we will have new `Candidate`'s to try so we should stop backtracking. Or to say that another way; We can continue backtracking as long as all the items in our list is still activated.
Next this new framework was used to make the error messages more focused. We only need to list the versions that conflict, as opposed to all previously activated versions.
Why is this more flexible?
1. It is not limited to conflicts within the same package. If `RemainingCandidates.next` skips something because of a links attribute, that is easy to record, just add the `PackageId` to the set `conflicting_prev_active`.
2. Arbitrary things can add conflicts to the backtracking. If we fail to activate because some dependency needs a feature that does not exist, that is easy to record, just add the `PackageId` to the set `conflicting_activations`.
3. All things that could cause use to fail will be in the error messages, as the error messages loop over the set.
4. With a simple extension, replacing the `HashSet` with a `HashMap<_, Reason>`, we can customize the error messages to show the nature of the conflict.
@alexcrichton, @aidanhs, Does the logic look right? Does this seem clearer to you?