]> git.proxmox.com Git - cargo.git/log
cargo.git
5 years agoadd failing test
Dale Wijnand [Mon, 30 Apr 2018 17:29:16 +0000 (13:29 -0400)]
add failing test

5 years agoAuto merge of #6493 - ehuss:fix-fingerprint-patch, r=alexcrichton
bors [Wed, 2 Jan 2019 17:59:46 +0000 (17:59 +0000)]
Auto merge of #6493 - ehuss:fix-fingerprint-patch, r=alexcrichton

Fix fingerprint calculation for patched deps.

If you have A→B→C where B and C are in a registry, and you `[patch]` C, the fingerprint calculation wasn't working correctly when C changes. The following sequence illustrates the problem:

1. Do a build from scratch.
2. Touch a file in C.
3. Build again. Everything rebuilds as expected.
4. Build again. You would expect this to be all fresh, but it rebuilds A.

The problem is the hash-busting doesn't propagate up to parents from dependencies. Normal targets normally aren't a problem because they have a `LocalFingerprint::MtimeBased` style local value which always recomputes the hash. However, registry dependencies have a `Precalculated` style local value which never recomputes the hash.

The solution here is to always recompute the hash. This shouldn't be too expensive, and is only done when writing the fingerprint, which should only happen when the target is dirty. I'm not entirely certain why the caching logic was added in #4125.

Fixes rust-lang/rust#57142

5 years agoAuto merge of #6512 - matklad:serde-version, r=dwijnand
bors [Wed, 2 Jan 2019 16:16:56 +0000 (16:16 +0000)]
Auto merge of #6512 - matklad:serde-version, r=dwijnand

serialize version directly

Streamline serialization more, cc #6511

5 years agoAuto merge of #6355 - MarcusCalhoun-Lopez:dyld_fix, r=alexcrichton
bors [Wed, 2 Jan 2019 15:44:56 +0000 (15:44 +0000)]
Auto merge of #6355 - MarcusCalhoun-Lopez:dyld_fix, r=alexcrichton

use DYLD_FALLBACK_LIBRARY_PATH for dylib_path_envvar on macOS

See https://users.rust-lang.org/t/subprocess-and-dynamic-library-linking-problem-interaction/7873/10
See https://trac.macports.org/ticket/57692

5 years agoAuto merge of #6510 - d-e-s-o:add-missing-noun, r=dwijnand
bors [Wed, 2 Jan 2019 15:02:02 +0000 (15:02 +0000)]
Auto merge of #6510 - d-e-s-o:add-missing-noun, r=dwijnand

Fix error message when resolving dependencies

The error message:
> Attempting to resolve a with more then one crate with the links=

seems to be missing a noun. It appears that we are resolving a
dependency, so adding that.

5 years agoserialize version directly
Aleksey Kladov [Wed, 2 Jan 2019 12:02:21 +0000 (15:02 +0300)]
serialize version directly

5 years agoAuto merge of #6511 - matklad:metadata-path, r=dwijnand
bors [Wed, 2 Jan 2019 11:56:44 +0000 (11:56 +0000)]
Auto merge of #6511 - matklad:metadata-path, r=dwijnand

use PathBuf in cargo metadata

I don't remember why we've used strings in the first place here, but I
think that historically there just weren't Serialize impls for
`Path`s!

5 years agouse path when serializing a package
Aleksey Kladov [Wed, 2 Jan 2019 11:30:49 +0000 (14:30 +0300)]
use path when serializing a package

5 years agouse PathBuf in cargo metadata
Aleksey Kladov [Wed, 2 Jan 2019 10:49:48 +0000 (13:49 +0300)]
use PathBuf in cargo metadata

I don't remember why we've used strings in the first place here, but I
think that historically there just weren't Serialize impls for
`Path`s!

5 years agoFix error message when resolving dependencies
Daniel Mueller [Wed, 2 Jan 2019 07:30:38 +0000 (23:30 -0800)]
Fix error message when resolving dependencies

The error message:
> Attempting to resolve a with more then one crate with the links=

seems to be missing a noun. It appears that we are resolving a
dependency, so adding that.

5 years agoAuto merge of #6506 - DamianX:ContributingTestLink, r=dwijnand
bors [Tue, 1 Jan 2019 11:16:05 +0000 (11:16 +0000)]
Auto merge of #6506 - DamianX:ContributingTestLink, r=dwijnand

Fixed link to testsuite in CONTRIBUTING.md

5 years agoFixed link to testsuite in CONTRIBUTING.md
Damian [Tue, 1 Jan 2019 10:31:17 +0000 (11:31 +0100)]
Fixed link to testsuite in CONTRIBUTING.md

5 years agoAuto merge of #6501 - vishallama:vishallama-doc-update-cargo.toml, r=dwijnand
bors [Mon, 31 Dec 2018 16:11:46 +0000 (16:11 +0000)]
Auto merge of #6501 - vishallama:vishallama-doc-update-cargo.toml, r=dwijnand

Update display of contents of Cargo.toml

When creating a (binary) program/crate using 'cargo new', with the new 2018 version of Rust the autogenerated Cargo.toml file contains a couple of additional lines. These lines have to do with edition and dependencies.

5 years agoAuto merge of #6502 - vishallama:vishallama-doc-update-cargo-1.toml, r=dwijnand
bors [Mon, 31 Dec 2018 15:46:40 +0000 (15:46 +0000)]
Auto merge of #6502 - vishallama:vishallama-doc-update-cargo-1.toml, r=dwijnand

Update display of contents of Cargo.toml

The display of the contents of the Cargo.toml file needs to be updated, in keeping with the Rust 2018 edition.

5 years agoUpdate display of contents of Cargo.toml
Vishal Lama [Mon, 31 Dec 2018 09:38:03 +0000 (02:38 -0700)]
Update display of contents of Cargo.toml

The display of the contents of the Cargo.toml file needs to be updated, in keeping with the Rust 2018 edition.

5 years agoUpdate display of contents of Cargo.toml
Vishal Lama [Mon, 31 Dec 2018 07:22:02 +0000 (00:22 -0700)]
Update display of contents of Cargo.toml

When creating a (binary) program using 'cargo new', with the new 2018 version of Rust the autogenerated Cargo.toml file contains a couple of additional lines. These lines have to do with edition and dependencies.

5 years agoAuto merge of #6495 - dwijnand:fixup-cargo-install-help, r=ehuss
bors [Sat, 29 Dec 2018 09:23:45 +0000 (09:23 +0000)]
Auto merge of #6495 - dwijnand:fixup-cargo-install-help, r=ehuss

Fixup cargo install's help message

None

5 years agoAuto merge of #6497 - ehuss:test-require-output-check, r=dwijnand
bors [Sat, 29 Dec 2018 08:58:42 +0000 (08:58 +0000)]
Auto merge of #6497 - ehuss:test-require-output-check, r=dwijnand

testsuite: Require failing commands to check output.

This requires that commands that expect an error (using `with_status()`) also check some part of the output, to ensure that the test is working correctly. As evidence by the few tests fixed here, it is dangerous to assume that the correct error will trigger.

Some of these check rustc error messages which is generally undesirable since they aren't always stable, but I think in the few cases they shouldn't be much of a problem. If that seems too risky, I can make them more generic.

5 years agoAuto merge of #6496 - k-nasa:delete_unnecessary_return, r=ehuss
bors [Sat, 29 Dec 2018 02:29:48 +0000 (02:29 +0000)]
Auto merge of #6496 - k-nasa:delete_unnecessary_return, r=ehuss

Delete unnecessary 'return'

Unnecessary return keyword deleted as it is also in the title

5 years agotestsuite: Require failing commands to check output.
Eric Huss [Sat, 29 Dec 2018 01:47:50 +0000 (17:47 -0800)]
testsuite: Require failing commands to check output.

5 years agoDelete unnecessary space
k-nasa [Sat, 29 Dec 2018 01:50:31 +0000 (10:50 +0900)]
Delete unnecessary space

5 years agorefactor: delete unnecessary return keyword
k-nasa [Sat, 29 Dec 2018 00:52:52 +0000 (09:52 +0900)]
refactor: delete unnecessary return keyword

5 years agoAuto merge of #6494 - ehuss:fix-unused-patch-warning, r=dwijnand
bors [Fri, 28 Dec 2018 17:38:04 +0000 (17:38 +0000)]
Auto merge of #6494 - ehuss:fix-unused-patch-warning, r=dwijnand

Fix new unused patch warning.

The unused `[patch]` warning added in #6470 was misfiring if you build only a subset of a workspace that doesn't include the patch.

I'm about 80% confident this new logic is correct. It addresses the scenario I discovered, and I tested a bunch of commands (generate-lockfile, update, etc.) to make sure they all work. However, the many ways that `resolve_with_previous` is called is tricky to ensure every scenario works correctly.

5 years agoFixup cargo install's help message
Dale Wijnand [Fri, 28 Dec 2018 13:56:50 +0000 (13:56 +0000)]
Fixup cargo install's help message

5 years agoFix new unused patch warning.
Eric Huss [Fri, 28 Dec 2018 01:13:31 +0000 (17:13 -0800)]
Fix new unused patch warning.

5 years agoFix fingerprint calculation for patched deps.
Eric Huss [Thu, 27 Dec 2018 23:47:09 +0000 (15:47 -0800)]
Fix fingerprint calculation for patched deps.

5 years agouse DYLD_FALLBACK_LIBRARY_PATH for dylib_path_envvar on macOS
Marcus Calhoun-Lopez [Wed, 28 Nov 2018 01:41:28 +0000 (18:41 -0700)]
use DYLD_FALLBACK_LIBRARY_PATH for dylib_path_envvar on macOS

When loading and linking a dynamic library or bundle, dlopen
searches in LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, PWD, and
DYLD_FALLBACK_LIBRARY_PATH.
In the Mach-O format, a dynamic library has an "install path."
Clients linking against the library record this path, and the
dynamic linker, dyld, uses it to locate the library.
dyld searches DYLD_LIBRARY_PATH *before* the install path.
dyld searches DYLD_FALLBACK_LIBRARY_PATH only if it cannot
find the library in the install path.
Setting DYLD_LIBRARY_PATH can easily have unintended
consequences.

See https://users.rust-lang.org/t/subprocess-and-dynamic-library-linking-problem-interaction/7873/10
See https://trac.macports.org/ticket/57692

5 years agoAuto merge of #6481 - ehuss:man-update, r=alexcrichton
bors [Mon, 24 Dec 2018 17:36:11 +0000 (17:36 +0000)]
Auto merge of #6481 - ehuss:man-update, r=alexcrichton

Some minor documentation changes.

A few updates for things that changed recently, some things that were
wrong/missing, and hopefully some clarifications on some matters.

For reviewing, I recommend ignoring the auto-generated .html/.man files and focus on the .md/.adoc files.

5 years agoAuto merge of #6480 - ehuss:metadata-links, r=alexcrichton
bors [Mon, 24 Dec 2018 16:39:34 +0000 (16:39 +0000)]
Auto merge of #6480 - ehuss:metadata-links, r=alexcrichton

Add `links` to `cargo metadata`.

This is needed for creating registry index entries.

5 years agoSome minor documentation changes.
Eric Huss [Sun, 23 Dec 2018 22:11:12 +0000 (14:11 -0800)]
Some minor documentation changes.

A few updates for things that changed recently, some things that were
wrong/missing, and hopefully some clarifications on some matters.

5 years agoAdd `links` to `cargo metadata`.
Eric Huss [Sun, 23 Dec 2018 19:28:26 +0000 (11:28 -0800)]
Add `links` to `cargo metadata`.

This is needed for creating registry index entries.

5 years agoAuto merge of #6476 - dwijnand:salvaged-semver-work, r=Eh2406
bors [Sat, 22 Dec 2018 22:14:54 +0000 (22:14 +0000)]
Auto merge of #6476 - dwijnand:salvaged-semver-work, r=Eh2406

Salvaged semver work

None

5 years agoReplace PackageId::wrap with PackageId::pure
Dale Wijnand [Thu, 20 Dec 2018 10:36:43 +0000 (10:36 +0000)]
Replace PackageId::wrap with PackageId::pure

5 years agoAuto merge of #6470 - ehuss:warn-unused-patch, r=alexcrichton
bors [Sat, 22 Dec 2018 21:49:21 +0000 (21:49 +0000)]
Auto merge of #6470 - ehuss:warn-unused-patch, r=alexcrichton

Warn on unused patches.

Adds a warning when a `[patch]` entry fails to match anything.
I've hit this several times in the past, and it always takes me
5 minutes of confusion to figure out what's wrong.

Fixes #6444

5 years agoWarn on unused patches.
Eric Huss [Fri, 21 Dec 2018 01:33:41 +0000 (17:33 -0800)]
Warn on unused patches.

5 years agoAuto merge of #6473 - Eh2406:rustc-0, r=alexcrichton
bors [Fri, 21 Dec 2018 20:07:17 +0000 (20:07 +0000)]
Auto merge of #6473 - Eh2406:rustc-0, r=alexcrichton

don't write a an incorrect rustc version to the fingerprint file

In making https://github.com/holmgr/cargo-sweep/pull/14 I noted that some fingerprint files related to build scripts report being built with a rustc that hashes to "0". To work around this I just marked them as still being needed, even though no rustc that hashes to "0" is currently installed.

I believe that this PR just filles in the correct info for the build script fingerprints. This makes it possible for outside tools to more reliably clean up after cargo, at basically no cost.
@ehuss Thanks again for the help.

5 years agodon't write a an incorrect rustc version to the fingerprint file
Eh2406 [Fri, 21 Dec 2018 17:04:37 +0000 (12:04 -0500)]
don't write a an incorrect rustc version to the fingerprint file

5 years agoAuto merge of #6466 - ehuss:registry-cleanup, r=alexcrichton
bors [Thu, 20 Dec 2018 15:40:49 +0000 (15:40 +0000)]
Auto merge of #6466 - ehuss:registry-cleanup, r=alexcrichton

Rewrite `login` and registry cleanups.

- Login:
    - Change `login` so that it reads the API host from the registry config so it knows the `{api}/me` URL to display.
    - The `--host` flag is deprecated/unused. It wasn't used for much before.
    - `--registry` supports interactive entry of the token (does not require it on the command line).
    - Displays a message after saving the token (fixes #5868).
    - Because `login` now requires an index, some of the tests had to be updated.
- Fix so that if `api` is missing from the config, it will display a nice error message instead of panicking with unwrap.

5 years agoRewrite `login` and registry cleanups.
Eric Huss [Thu, 20 Dec 2018 01:40:01 +0000 (17:40 -0800)]
Rewrite `login` and registry cleanups.

5 years agoAuto merge of #6462 - pavel-zhigulin:fix_issue_\96\96#6461, r=ehuss
bors [Thu, 20 Dec 2018 11:36:14 +0000 (11:36 +0000)]
Auto merge of #6462 - pavel-zhigulin:fix_issue_\96\96#6461, r=ehuss

[issue#6461] Fix cargo commands list

Fixes #6461 -  cargo autocompletion script

5 years agoRemove tail call
Zhigulin Pavel [Thu, 20 Dec 2018 11:01:22 +0000 (14:01 +0300)]
Remove tail call

5 years agoUse ToSemver more
Dale Wijnand [Wed, 19 Dec 2018 23:49:36 +0000 (23:49 +0000)]
Use ToSemver more

5 years agoAuto merge of #6469 - ehuss:registry-name, r=dwijnand
bors [Thu, 20 Dec 2018 08:02:10 +0000 (08:02 +0000)]
Auto merge of #6469 - ehuss:registry-name, r=dwijnand

Restrict registry names to same style as package names.

See https://github.com/rust-lang/cargo/issues/4688#issuecomment-341114657

5 years agoRestrict registry names to same style as package names.
Eric Huss [Thu, 20 Dec 2018 04:33:57 +0000 (20:33 -0800)]
Restrict registry names to same style as package names.

5 years agoAuto merge of #6463 - dwijnand:rip-stale-bot, r=alexcrichton
bors [Wed, 19 Dec 2018 14:45:14 +0000 (14:45 +0000)]
Auto merge of #6463 - dwijnand:rip-stale-bot, r=alexcrichton

Remove Stale bot's configuration

We couldn't get stale bot to operate as we'd like (poke up N
older-then-X-period tickets a day) and therefore we're tearing it down.

We've chosen to keep the "stale" label, so tickets closed by the bot
may be found with that label.

Closes #6035

5 years agoAuto merge of #6464 - dwijnand:add-labels-to-issue-templates, r=Eh2406
bors [Wed, 19 Dec 2018 13:02:52 +0000 (13:02 +0000)]
Auto merge of #6464 - dwijnand:add-labels-to-issue-templates, r=Eh2406

Add labels to issue templates

Make use of https://blog.github.com/changelog/2018-12-05-issue-template-automation-improvements/

5 years agoAdd labels to issue templates
Dale Wijnand [Wed, 19 Dec 2018 12:03:20 +0000 (12:03 +0000)]
Add labels to issue templates

Make use of https://blog.github.com/changelog/2018-12-05-issue-template-automation-improvements/

5 years agoRemove Stale bot's configuration
Dale Wijnand [Wed, 19 Dec 2018 11:48:33 +0000 (11:48 +0000)]
Remove Stale bot's configuration

We couldn't get stale bot to operate as we'd like (poke up N
older-then-X-period tickets a day) and therefore we're tearing it down.

We've chosen to keep the "stale" label, so tickets closed by the bot
may be found with that label.

5 years agoUse awk to parse cargo --list
Zhigulin Pavel [Wed, 19 Dec 2018 09:37:18 +0000 (12:37 +0300)]
Use awk to parse cargo --list

5 years ago[issue#6161] Fix cargo commands list
Pavel Zhigulin [Wed, 19 Dec 2018 02:59:03 +0000 (05:59 +0300)]
[issue#6161] Fix cargo commands list

5 years agoAuto merge of #6459 - ehuss:fix-man-checks, r=alexcrichton
bors [Tue, 18 Dec 2018 20:40:52 +0000 (20:40 +0000)]
Auto merge of #6459 - ehuss:fix-man-checks, r=alexcrichton

Fix new man page links.

The rustc link checker found some problems:
- The raw generated HTML files were being included when they shouldn't.
  Fixed by moving them out of the mdbook directory.
- The `print.html` file concatenates all the pages together, causing duplicate
  `id`'s.  Fix by giving each page a unique set of IDs.

5 years agoFix new man page links.
Eric Huss [Tue, 18 Dec 2018 20:06:58 +0000 (12:06 -0800)]
Fix new man page links.

The rustc link checker found some problems:
- The raw generated HTML files were being included when they shouldn't.
  Fixed by moving them out of the mdbook directory.
- The `print.html` file concatenates all the pages together, causing duplicate
  `id`'s.  Fix by giving each page a unique set of IDs.

5 years agoAuto merge of #6432 - ehuss:fix-metabuild-json, r=alexcrichton
bors [Tue, 18 Dec 2018 15:49:51 +0000 (15:49 +0000)]
Auto merge of #6432 - ehuss:fix-metabuild-json, r=alexcrichton

Fix metabuild compile errors with --message-format=json.

If an error occurs while compiling a metabuild target with `--message-format=json`, it would panic because it was unable to serialize `Target`. This change makes it so that it places a fake "metabuild.rs" string in the `src_path` in this situation.

I'm very unhappy with this solution, but I'm unable to think of something better. Changing `src_path` to an `Option` (or something) would break existing tools (this might break, but maybe not catastrophically?). I tried implementing something that resets the `src_path` to the correct path in the target dir after the workspace is configured, but it felt very brittle – you have to fix up after all dependencies are downloaded, and there's not a good place to ensure that happens correctly. Any alternate ideas?

This adds a `with_json_contains_unordered` to help with tests.

5 years agoAuto merge of #6456 - ehuss:patch-alt-reg, r=alexcrichton
bors [Tue, 18 Dec 2018 05:14:47 +0000 (05:14 +0000)]
Auto merge of #6456 - ehuss:patch-alt-reg, r=alexcrichton

Support alt-registry names in [patch] table.

Closes #5149

5 years agoSupport alt-registry names in [patch] table.
Eric Huss [Tue, 18 Dec 2018 04:35:50 +0000 (20:35 -0800)]
Support alt-registry names in [patch] table.

5 years agoUpdate metabuild test to 2018.
Eric Huss [Tue, 18 Dec 2018 03:58:32 +0000 (19:58 -0800)]
Update metabuild test to 2018.

5 years agoSwitch SerializedTarget::src_path to None instead of using fake path.
Eric Huss [Tue, 18 Dec 2018 03:55:10 +0000 (19:55 -0800)]
Switch SerializedTarget::src_path to None instead of using fake path.

5 years agoFix metabuild compile errors with --message-format=json.
Eric Huss [Thu, 13 Dec 2018 20:37:25 +0000 (12:37 -0800)]
Fix metabuild compile errors with --message-format=json.

If an error occurs while compiling a metabuild target with
`--message-format=json`, it would panic because it was unable to serialize
`Target`. This change makes it so that it places a fake "metabuild.rs" string in
the `src_path` in this situation.

I'm very unhappy with this solution, but I'm unable to think of something
better. Changing `src_path` to an `Option` (or something) would break existing
tools. I tried implementing something that resets the `src_path` to the correct
path in the target dir after the workspace is configured, but it felt very
brittle – you have to fix up after all dependencies are downloaded, and there's
not a good way to ensure that happens correctly.

This adds a `with_json_contains_unordered` to help with tests.

5 years agoAuto merge of #6455 - wezm:patch-1, r=dwijnand
bors [Mon, 17 Dec 2018 23:53:39 +0000 (23:53 +0000)]
Auto merge of #6455 - wezm:patch-1, r=dwijnand

Update the rustup URL

Yesterday at the Melbourne Rust meetup I helped someone install Rust on their Mac. They were following the instructions from the cargo book and I was surprised to see `rustup` and all the tools being installed globally in `/usr/local/bin`. Eventually we worked out that the URL in the cargo book was different from the one on the Rust website and on rustup.rs. After using the other URL the install proceeded as expected, installing into the user's home directory. It appears the old link is an old version of rustup/rust-init.

This PR updates the install command to match the Rust home page.

5 years agoUpdate the rustup URL
Wesley Moore [Mon, 17 Dec 2018 23:41:30 +0000 (10:41 +1100)]
Update the rustup URL

5 years agoAuto merge of #6405 - ehuss:new-man, r=alexcrichton
bors [Mon, 17 Dec 2018 18:13:06 +0000 (18:13 +0000)]
Auto merge of #6405 - ehuss:new-man, r=alexcrichton

New man pages.

This is a rewrite and update of the man pages. This also adds them to the website documentation. They are now in Asciidoc format to make it easy to output multiple formats and have decent formatting. There is a Makefile with instructions on how to rebuild the man pages.

Closes #5729.

5 years agoAuto merge of #6451 - dwijnand:reify-DepFingerprint, r=alexcrichton
bors [Mon, 17 Dec 2018 17:13:53 +0000 (17:13 +0000)]
Auto merge of #6451 - dwijnand:reify-DepFingerprint, r=alexcrichton

Reify the DepFingerprint type

I'm very slightly concerned I might've incompatibly changed the serialise/deserialise code with respect to existing serialised data, so please double-check my work.

5 years agoReify the DepFingerprint type
Dale Wijnand [Mon, 17 Dec 2018 08:48:20 +0000 (08:48 +0000)]
Reify the DepFingerprint type

5 years agoAuto merge of #6449 - dwijnand:extract-Fingerprint-new, r=alexcrichton
bors [Mon, 17 Dec 2018 16:42:56 +0000 (16:42 +0000)]
Auto merge of #6449 - dwijnand:extract-Fingerprint-new, r=alexcrichton

Extract Fingerprint::new

None

5 years agoAuto merge of #6448 - dwijnand:upgrade-the-metabuild-to-rust-2018, r=ehuss
bors [Mon, 17 Dec 2018 15:42:58 +0000 (15:42 +0000)]
Auto merge of #6448 - dwijnand:upgrade-the-metabuild-to-rust-2018, r=ehuss

Upgrade the metabuild to Rust 2018

Just happened across the code that @ehuss mentioned in https://github.com/rust-lang/cargo/pull/6423#issuecomment-446807216 and thought of reviving that effort.

@ehuss says there's no reason to.  Let's see if it passes CI and we should land this change or not.

5 years agoAuto merge of #6450 - dwijnand:make-edition-comparing-code-consistent, r=Eh2406
bors [Mon, 17 Dec 2018 13:32:59 +0000 (13:32 +0000)]
Auto merge of #6450 - dwijnand:make-edition-comparing-code-consistent, r=Eh2406

Make edition comparing code consistent

Rather than sometimes comparing equality, sometimes using ordering and
sometimes pattern matching, consistently compare by equalty to 2015.

5 years agoExtract Fingerprint::new
Dale Wijnand [Mon, 17 Dec 2018 08:07:15 +0000 (08:07 +0000)]
Extract Fingerprint::new

5 years agoMake edition comparing code consistent
Dale Wijnand [Mon, 17 Dec 2018 08:11:20 +0000 (08:11 +0000)]
Make edition comparing code consistent

Rather than sometimes comparing equality, sometimes using ordering and
sometimes pattern matching, consistently compare by equalty to 2015.

5 years agoUpgrade the metabuild to Rust 2018
Dale Wijnand [Mon, 17 Dec 2018 07:36:14 +0000 (07:36 +0000)]
Upgrade the metabuild to Rust 2018

5 years agoAuto merge of #6447 - ehuss:doc-name-authors, r=alexcrichton
bors [Mon, 17 Dec 2018 03:28:16 +0000 (03:28 +0000)]
Auto merge of #6447 - ehuss:doc-name-authors, r=alexcrichton

Document `name` and `authors` in [package]

I don't think we need to take a principled stand on the exact meaning of
"authors", so I left it somewhat vague. Also, it was made optional in #3682 so
the existing docs were a little wrong.

Closes #5934

5 years agoDocument `name` and `authors` in [package]
Eric Huss [Sun, 16 Dec 2018 18:05:52 +0000 (10:05 -0800)]
Document `name` and `authors` in [package]

5 years agoAuto merge of #6443 - ehuss:ci-install-mdbook, r=alexcrichton
bors [Fri, 14 Dec 2018 23:14:58 +0000 (23:14 +0000)]
Auto merge of #6443 - ehuss:ci-install-mdbook, r=alexcrichton

Travis: only use mdbook 0.1.7.

The latest mdbook does not build (https://github.com/rust-lang-nursery/mdBook/issues/852). Cargo uses 0.1.7, so force install only that version.

5 years agoOn CI only use mdbook 0.1.7.
Eric Huss [Fri, 14 Dec 2018 19:45:12 +0000 (11:45 -0800)]
On CI only use mdbook 0.1.7.

5 years agoAuto merge of #6439 - rust-lang:dependabot/cargo/git2-curl-0.9.0, r=alexcrichton
bors [Fri, 14 Dec 2018 16:56:14 +0000 (16:56 +0000)]
Auto merge of #6439 - rust-lang:dependabot/cargo/git2-curl-0.9.0, r=alexcrichton

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.
<details>
<summary>Commits</summary>

- See full diff in [compare view](https://github.com/alexcrichton/git2-rs/commits)
</details>
<br />

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>

5 years agoUpdate git2-curl requirement from 0.8.1 to 0.9.0
dependabot[bot] [Fri, 14 Dec 2018 16:30:00 +0000 (16:30 +0000)]
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>
5 years agoAuto merge of #6438 - rust-lang:dependabot/cargo/git2-0.8.0, r=alexcrichton
bors [Fri, 14 Dec 2018 15:50:31 +0000 (15:50 +0000)]
Auto merge of #6438 - rust-lang:dependabot/cargo/git2-0.8.0, r=alexcrichton

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.
<details>
<summary>Commits</summary>

- See full diff in [compare view](https://github.com/alexcrichton/git2-rs/commits/git2-curl-0.8.0)
</details>
<br />

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>

5 years agoUpdate git2 requirement from 0.7.5 to 0.8.0
dependabot[bot] [Fri, 14 Dec 2018 05:51:03 +0000 (05:51 +0000)]
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>
5 years agoAuto merge of #6419 - ehuss:fix-show-errors, r=alexcrichton
bors [Fri, 14 Dec 2018 00:11:15 +0000 (00:11 +0000)]
Auto merge of #6419 - ehuss:fix-show-errors, r=alexcrichton

Display errors when `cargo fix` fails.

It can be difficult to figure out what's wrong when a user reports that `cargo fix` fails. It can be hard to figure out which suggestion caused a compile error, especially if the error is in another file/location.

5 years agoAuto merge of #6434 - ehuss:fix-fix-concurrent, r=dwijnand
bors [Thu, 13 Dec 2018 23:31:39 +0000 (23:31 +0000)]
Auto merge of #6434 - ehuss:fix-fix-concurrent, r=dwijnand

cargo fix: fix targets with shared sources.

If `cargo fix` attempts to fix multiple targets concurrently that have shared
source files, it would apply fixes multiple times causing corruption of the
source code. Fix this by locking on the package path instead of the target
filename, essentially serializing all targets within a package.

Fixes #6415.

5 years agocargo fix: fix targets with shared sources.
Eric Huss [Thu, 13 Dec 2018 22:29:26 +0000 (14:29 -0800)]
cargo fix: fix targets with shared sources.

If `cargo fix` attempts to fix multiple targets concurrently that have shared
source files, it would apply fixes multiple times causing corruption of the
source code. Fix this by locking on the package path instead of the target
filename, essentially serializing all targets within a package.

5 years agoUpdate rustfix to 0.4.4.
Eric Huss [Thu, 13 Dec 2018 22:01:44 +0000 (14:01 -0800)]
Update rustfix to 0.4.4.

5 years agoDisplay errors when `cargo fix` fails.
Eric Huss [Wed, 12 Dec 2018 00:24:20 +0000 (16:24 -0800)]
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.

5 years agoAuto merge of #6431 - ehuss:panic-in-panic, r=nrc
bors [Thu, 13 Dec 2018 20:12:04 +0000 (20:12 +0000)]
Auto merge of #6431 - ehuss:panic-in-panic, r=nrc

Fix panic-in-panic in tests.

There are some very rare circumstances that can cause a double panic during
development. For example, `.with_json("")` (or any invalid JSON) will panic, and then the drop
will also panic.  This can cause a confusing SIGILL.

5 years agoFix panic-in-panic in tests.
Eric Huss [Thu, 13 Dec 2018 19:55:38 +0000 (11:55 -0800)]
Fix panic-in-panic in tests.

There are some very rare circumstances that can cause a double panic during
development. For example, `.with_json("")` will panic, and then the drop
will also panic.

5 years agoAuto merge of #6422 - dwijnand:more-rust-2018, r=alexcrichton
bors [Thu, 13 Dec 2018 19:10:10 +0000 (19:10 +0000)]
Auto merge of #6422 - dwijnand:more-rust-2018, r=alexcrichton

More Rust 2018 edition cleanups

None

5 years agoAuto merge of #6429 - dwijnand:cleanup-SourceId-trait-impls, r=alexcrichton
bors [Thu, 13 Dec 2018 16:26:17 +0000 (16:26 +0000)]
Auto merge of #6429 - dwijnand:cleanup-SourceId-trait-impls, r=alexcrichton

Cleanup some trait impls for SourceId

None

5 years agoCleanup some trait impls for SourceId
Dale Wijnand [Sun, 25 Nov 2018 12:15:57 +0000 (12:15 +0000)]
Cleanup some trait impls for SourceId

5 years agoRemove trailing extern crate usage
Dale Wijnand [Wed, 12 Dec 2018 21:20:44 +0000 (21:20 +0000)]
Remove trailing extern crate usage

5 years agoRemove trailing cfg_attr feature = "cargo-clippy" usage
Dale Wijnand [Wed, 12 Dec 2018 21:20:55 +0000 (21:20 +0000)]
Remove trailing cfg_attr feature = "cargo-clippy" usage

5 years agoAuto merge of #6427 - phansch:remove_nightly_check_in_test, r=dwijnand
bors [Thu, 13 Dec 2018 07:40:41 +0000 (07:40 +0000)]
Auto merge of #6427 - phansch:remove_nightly_check_in_test, r=dwijnand

Remove a nightly check from doc tests

None

5 years agoRemove a nightly check from doc tests
Philipp Hansch [Thu, 13 Dec 2018 06:55:08 +0000 (07:55 +0100)]
Remove a nightly check from doc tests

5 years agoAuto merge of #6425 - dwijnand:promote-failure-error, r=alexcrichton
bors [Thu, 13 Dec 2018 06:10:04 +0000 (06:10 +0000)]
Auto merge of #6425 - dwijnand:promote-failure-error, r=alexcrichton

Replace CargoError with failure::Error

None

5 years agoAuto merge of #6426 - dwijnand:allow-testsuite-warnings-in-dev, r=nrc
bors [Thu, 13 Dec 2018 01:10:43 +0000 (01:10 +0000)]
Auto merge of #6426 - dwijnand:allow-testsuite-warnings-in-dev, r=nrc

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.

5 years agoAllow testsuite warnings in dev
Dale Wijnand [Thu, 13 Dec 2018 01:00:27 +0000 (01:00 +0000)]
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.

5 years agoReplace CargoError with failure::Error
Dale Wijnand [Wed, 12 Dec 2018 23:23:49 +0000 (23:23 +0000)]
Replace CargoError with failure::Error

5 years agoMerge pull request #6371 from matklad/update-dry-run
Nick Cameron [Wed, 12 Dec 2018 21:32:39 +0000 (16:32 -0500)]
Merge pull request #6371 from matklad/update-dry-run

add `--dry-run` option to cargo update

5 years agoAuto merge of #6416 - alexcrichton:idioms, r=dwijnand
bors [Tue, 11 Dec 2018 13:56:34 +0000 (13:56 +0000)]
Auto merge of #6416 - alexcrichton:idioms, r=dwijnand

Migrate to some Rust 2018 idioms

Run a few lints, hand-edit a few things, otherwise try to help push Cargo into the 2018 edition!

5 years agoReformat after idiom lints
Alex Crichton [Tue, 11 Dec 2018 01:58:06 +0000 (17:58 -0800)]
Reformat after idiom lints

5 years agoTurn on Rust 2018 idiom warnings unconditionally
Alex Crichton [Tue, 11 Dec 2018 01:57:10 +0000 (17:57 -0800)]
Turn on Rust 2018 idiom warnings unconditionally

It may take us awhile to get used to them, so let's see how this goes!

5 years agoRun `cargo fix --edition-idioms` and fixup output
Alex Crichton [Tue, 11 Dec 2018 01:55:13 +0000 (17:55 -0800)]
Run `cargo fix --edition-idioms` and fixup output

This gets Cargo passing the `--edition-idioms` lints and more down the
road of the 2018 edition!