Commit graph

2767 commits

Author SHA1 Message Date
Timothy Bess 17572b8c91 Issue #5087
* fix broken test case
2018-02-28 16:12:34 -05:00
Timothy Bess 68a681ff03 Issue #5087
* remove Workspace::current_manifest
* remove incorrect logging
* move empty check to Packages::into_package_id_specs
* add test case mentioned in issue
2018-02-27 21:37:40 -05:00
Alex Crichton 8b475c1085 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
2018-02-27 07:50:58 -08:00
Alex Crichton a85c917b6b Update git2 to 0.7.0
cc #5066
2018-02-27 06:24:26 -08:00
bors 3361918384 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.
2018-02-27 04:44:41 +00:00
Toby Hughes 0661b3fbb5 Merge remote-tracking branch 'upstream/master' 2018-02-26 15:36:23 -08:00
Eh2406 0247dc429a intellij rust suggested fixes
(cherry picked from commit 24836e9)
2018-02-26 17:29:17 -05:00
Eric Huss c61efd8c39 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
2018-02-25 16:51:48 -08:00
bors fe0c18b9db 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.
2018-02-24 20:46:55 +00:00
bors f75f403ed1 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>
2018-02-24 19:34:52 +00:00
Eh2406 97249ec060 fix a missing test, this was missed in the rebase of #5063 2018-02-22 11:37:51 -05:00
Eric Huss f66fe2c650 Fix appveyor failure, messages differ by platform. 2018-02-21 14:33:20 -08:00
Eric Huss 4c0b239c1f Expose git errors during authentication. 2018-02-21 14:29:33 -08:00
Eh2406 68a40ad42b Merge remote-tracking branch 'origin/master' into links 2018-02-21 15:41:48 -05:00
Eh2406 7a564576f1 fix winapi import 2018-02-21 14:26:29 -05:00
André Rocha 98f17bcc56 Adding cargo.rs file tests as cargo_command.rs. 2018-02-21 13:33:52 -05:00
André Rocha c2ff988c9f Reorganize integration tests as one crate with many modules. Issue #4867. 2018-02-21 13:33:51 -05:00