]> git.proxmox.com Git - cargo.git/log
cargo.git
5 years agonew/init: Don't include email if it is empty.
Eric Huss [Sun, 31 Mar 2019 21:05:49 +0000 (14:05 -0700)]
new/init: Don't include email if it is empty.

5 years agoAuto merge of #6799 - ehuss:fix-member_manifest_version_error-network, r=alexcrichton
bors [Sun, 31 Mar 2019 12:23:06 +0000 (12:23 +0000)]
Auto merge of #6799 - ehuss:fix-member_manifest_version_error-network, r=alexcrichton

Fix member_manifest_version_error accessing the network.

This test was updating the registry via github.  Add a `.cargo/config` file so that it doesn't.

5 years agoFix member_manifest_version_error accessing the network.
Eric Huss [Sun, 31 Mar 2019 02:12:32 +0000 (19:12 -0700)]
Fix member_manifest_version_error accessing the network.

5 years agoAuto merge of #6792 - collin5:patch-1, r=alexcrichton
bors [Fri, 29 Mar 2019 12:31:50 +0000 (12:31 +0000)]
Auto merge of #6792 - collin5:patch-1, r=alexcrichton

Fix Init for Fossil SCM project

I believe [here](https://github.com/rust-lang/cargo/pull/6792/files#diff-149dd4362a3b0dc13b113762713119dfL527) we should be checking if `.fossil` doesn't exist instead of the latter!

5 years agofix vcs init for Fossil project
Collins Abitekaniza [Fri, 29 Mar 2019 09:31:19 +0000 (12:31 +0300)]
fix vcs init for Fossil project

5 years agoAuto merge of #6787 - ehuss:code-cleanup, r=alexcrichton
bors [Wed, 27 Mar 2019 12:26:45 +0000 (12:26 +0000)]
Auto merge of #6787 - ehuss:code-cleanup, r=alexcrichton

Code cleanup

I think these changes should not be controversial, at least it looks cleaner to me. Split up into separate commits for different things.

5 years agoAuto merge of #6298 - lu-zero:rustc-link-args, r=alexcrichton
bors [Wed, 27 Mar 2019 12:03:57 +0000 (12:03 +0000)]
Auto merge of #6298 - lu-zero:rustc-link-args, r=alexcrichton

Add cargo:rustc-link-arg to pass custom linker arguments

It is useful to produce correct `cdylibs` on platforms such as Linux and
MacOS.

Groundwork to address https://github.com/rust-lang/cargo/issues/5045 in the future.

5 years agoCleanup: Misc.
Eric Huss [Wed, 27 Mar 2019 02:06:08 +0000 (19:06 -0700)]
Cleanup: Misc.

5 years agoCleanup: Remove redundant clones.
Eric Huss [Wed, 27 Mar 2019 01:51:13 +0000 (18:51 -0700)]
Cleanup: Remove redundant clones.

5 years agoCleanup: Remove unnecessary borrows.
Eric Huss [Wed, 27 Mar 2019 00:53:53 +0000 (17:53 -0700)]
Cleanup: Remove unnecessary borrows.

5 years agoAuto merge of #6786 - ehuss:remove-is_nightly-test-checks, r=dwijnand
bors [Tue, 26 Mar 2019 23:45:46 +0000 (23:45 +0000)]
Auto merge of #6786 - ehuss:remove-is_nightly-test-checks, r=dwijnand

Testsuite: remove some unnecessary is_nightly checks.

5 years agoAuto merge of #6534 - ehuss:meta-deps-name-null, r=alexcrichton
bors [Tue, 26 Mar 2019 23:22:07 +0000 (23:22 +0000)]
Auto merge of #6534 - ehuss:meta-deps-name-null, r=alexcrichton

cargo metadata: Don't show `null` deps.

If a package has a dependency without a library target, the "name" field was
showing up as null in `resolve.nodes.deps`. At this time (AFAIK), binary-only
dependencies are always ignored. Instead of making users filter out this entry
(or more commonly, crash), just don't include it.

5 years agoAuto merge of #6785 - ehuss:fingerprint-cleanup, r=dwijnand
bors [Tue, 26 Mar 2019 22:25:44 +0000 (22:25 +0000)]
Auto merge of #6785 - ehuss:fingerprint-cleanup, r=dwijnand

Some fingerprint cleanup.

Just a minor cleanup.

Move `CARGO_PKG_*` values from Metadata to Fingerprint (added in #3857).  Closes #6208.  This prevents stale artifacts from being left behind when these values change. Also tracks changes to the "repository" value (added in #6096).

Remove `edition` as a separate field. It is already tracked in `target`. This was required previously to #5816 which added per-target editions.

Also adds a helper to the testsuite to make globbing easier.

5 years agoTestsuite: remove some unnecessary is_nightly checks.
Eric Huss [Tue, 26 Mar 2019 20:56:14 +0000 (13:56 -0700)]
Testsuite: remove some unnecessary is_nightly checks.

5 years agoSome fingerprint cleanup.
Eric Huss [Tue, 26 Mar 2019 20:21:05 +0000 (13:21 -0700)]
Some fingerprint cleanup.

5 years agoAuto merge of #6782 - ehuss:build-script-fingerprint-fixes, r=alexcrichton
bors [Tue, 26 Mar 2019 00:09:43 +0000 (00:09 +0000)]
Auto merge of #6782 - ehuss:build-script-fingerprint-fixes, r=alexcrichton

Fix fingerprint for canceled build script.

Fixes #6770. See that issue for a description.

The fix is to include the compilation of the build script itself in the fingerprint of the `RunCustomBuild` Unit.

This also includes some documentation for how fingerprints work.

Also includes a test for docker-style caching of dependencies where timestamps get truncated to the nearest second.

5 years agoUpdate for review comments.
Eric Huss [Mon, 25 Mar 2019 23:39:03 +0000 (16:39 -0700)]
Update for review comments.

5 years agoAuto merge of #6778 - phil-opp:canonicalize-config-target, r=alexcrichton
bors [Mon, 25 Mar 2019 19:04:21 +0000 (19:04 +0000)]
Auto merge of #6778 - phil-opp:canonicalize-config-target, r=alexcrichton

Canonicalize default target if it ends with `.json`

Targets that end with `.json` are not target triples but paths to target configuration files. We currently canonicalize all `.json` paths that are passed as `--target` so that the paths are still valid when building dependencies (where the current working directory is changed).

This commit adds the same canonicalization to default targets specified in a `build.target` key in a `.cargo/config` file by adding a new `Config::target_triple` function.

5 years agoCanonicalize default target if it ends with `.json`
Philipp Oppermann [Mon, 25 Mar 2019 14:28:31 +0000 (15:28 +0100)]
Canonicalize default target if it ends with `.json`

5 years agoAuto merge of #6781 - ehuss:fix-panic-unwind-extra, r=Eh2406
bors [Sun, 24 Mar 2019 21:51:44 +0000 (21:51 +0000)]
Auto merge of #6781 - ehuss:fix-panic-unwind-extra, r=Eh2406

Fix setting `panic=unwind` compiling lib a extra time.

Explicitly setting `panic=unwind` in a profile could cause the `lib` target to be built multiple times when it shouldn't be. This is because libs as a test dependency explicitly clear the panic setting (because they are incompatible with `abort`). However, the deduplication logic doesn't know that `panic=None` is the same as `panic=Some("unwind")`. This changes it so there is an explicit enum that defaults to `PanicStrategy::Unwind`.

Fixes #6774.

5 years agoFix fingerprint for canceled build script.
Eric Huss [Sat, 23 Mar 2019 22:58:11 +0000 (15:58 -0700)]
Fix fingerprint for canceled build script.

5 years agoFix setting `panic=unwind` compiling lib a extra time.
Eric Huss [Sat, 23 Mar 2019 23:58:03 +0000 (16:58 -0700)]
Fix setting `panic=unwind` compiling lib a extra time.

5 years agoAuto merge of #6771 - sgrif:sg-always-show-errors-nicely, r=alexcrichton
bors [Thu, 21 Mar 2019 19:00:57 +0000 (19:00 +0000)]
Auto merge of #6771 - sgrif:sg-always-show-errors-nicely, r=alexcrichton

Always nicely show errors from crates.io if possible

Currently if Cargo ever gets a non-200 response, it will either not show
the error at all (if it was a 403 or 404), or spit out the entire
response body. Historically crates.io has served a 200 for most errors
to work around this, but we've stopped doing this as it causes problems
for other clients.

Additionally, we're starting to server more errors that have semantic
meaning (429 for rate limiting, 503 when we're in read only mode). If
the request specifies "Accept: application/json", we should ideally
return the errors formatted nicely. This isn't always true, but it's
what we'd like to do going forward.

While the output that Cargo puts out at least contains the actual
message, it's buried under a ton of useless info. This changes the
behavior so that if the response was valid JSON in the format that Cargo
expects, it just shows that (along with a description of the response
status), and only falls back to spitting out everything if it can't
parse the response body.

I'd love to add some more tests for this, but I've had trouble finding
anywhere in the test suite that exercises these paths.

5 years agoAlways nicely show errors from crates.io if possible
Sean Griffin [Thu, 21 Mar 2019 18:10:43 +0000 (12:10 -0600)]
Always nicely show errors from crates.io if possible

Currently if Cargo ever gets a non-200 response, it will either not show
the error at all (if it was a 403 or 404), or spit out the entire
response body. Historically crates.io has served a 200 for most errors
to work around this, but we've stopped doing this as it causes problems
for other clients.

Additionally, we're starting to server more errors that have semantic
meaning (429 for rate limiting, 503 when we're in read only mode). If
the request specifies "Accept: application/json", we should ideally
return the errors formatted nicely. This isn't always true, but it's
what we'd like to do going forward.

While the output that Cargo puts out at least contains the actual
message, it's buried under a ton of useless info. This changes the
behavior so that if the response was valid JSON in the format that Cargo
expects, it just shows that (along with a description of the response
status), and only falls back to spitting out everything if it can't
parse the response body.

I'd love to add some more tests for this, but I've had trouble finding
anywhere in the test suite that exercises these paths.

5 years agoAuto merge of #6768 - ehuss:cwd-relative, r=alexcrichton
bors [Thu, 21 Mar 2019 14:14:42 +0000 (14:14 +0000)]
Auto merge of #6768 - ehuss:cwd-relative, r=alexcrichton

Testsuite: Make `cwd()` relative to project root.

It's a fairly common pattern, and it seemed natural to me.

5 years agoTestsuite: Make `cwd()` relative to project root.
Eric Huss [Wed, 20 Mar 2019 23:34:56 +0000 (16:34 -0700)]
Testsuite: Make `cwd()` relative to project root.

It's a fairly common pattern, and it seemed natural to me.

5 years agoAuto merge of #6767 - ehuss:fix-git-ignore-of-root, r=Eh2406
bors [Wed, 20 Mar 2019 19:36:28 +0000 (19:36 +0000)]
Auto merge of #6767 - ehuss:fix-git-ignore-of-root, r=Eh2406

Allow `cargo fix` if gitignore matches root working dir.

If `.gitignore` had a rule that matched the root working directory, it would believe that the whole thing is ignored. This is not usually how git works (AFAIK), so don't check gitignore against the root.

Closes #6766

5 years agoAllow `cargo fix` if gitignore matches root working dir.
Eric Huss [Wed, 20 Mar 2019 19:22:44 +0000 (12:22 -0700)]
Allow `cargo fix` if gitignore matches root working dir.

5 years agoAuto merge of #6763 - fabric-and-ink:remove_redundant_imports, r=ehuss
bors [Tue, 19 Mar 2019 20:16:43 +0000 (20:16 +0000)]
Auto merge of #6763 - fabric-and-ink:remove_redundant_imports, r=ehuss

Remove redundant imports

Removes two redundant imports. These showed up while working on a [lint for rustc](https://github.com/rust-lang/rust/pull/58805/).

5 years agoRemove redundant imports
Fabian Drinck [Tue, 19 Mar 2019 19:35:13 +0000 (20:35 +0100)]
Remove redundant imports

5 years agoAuto merge of #6761 - alexcrichton:handle-toml, r=ehuss
bors [Tue, 19 Mar 2019 15:47:25 +0000 (15:47 +0000)]
Auto merge of #6761 - alexcrichton:handle-toml, r=ehuss

Handle backcompat hazard with `toml` crate

The 0.5.0 release contained a
[bugfix](https://github.com/alexcrichton/toml-rs/pull/280) which
previously successfully parsed invalid TOML files, so we'll need to
manually handle that in Cago to ensure that we don't accidentally
regress crates, but rather instead give them an appropriate amount of
time to get fixed.

5 years agoAuto merge of #6756 - ehuss:fix-dirty_both_lib_and_test, r=alexcrichton
bors [Tue, 19 Mar 2019 15:22:56 +0000 (15:22 +0000)]
Auto merge of #6756 - ehuss:fix-dirty_both_lib_and_test, r=alexcrichton

Fix spurious error in dirty_both_lib_and_test.

On HFS, if it runs fast enough, the mtimes will be equal, causing it to fail to rebuild.

Seen on #6755 https://travis-ci.com/rust-lang/cargo/jobs/185412514

5 years agoHandle backcompat hazard with `toml` crate
Alex Crichton [Mon, 18 Mar 2019 14:32:59 +0000 (07:32 -0700)]
Handle backcompat hazard with `toml` crate

The 0.5.0 release contained a
[bugfix](https://github.com/alexcrichton/toml-rs/pull/280) which
previously successfully parsed invalid TOML files, so we'll need to
manually handle that in Cago to ensure that we don't accidentally
regress crates, but rather instead give them an appropriate amount of
time to get fixed.

5 years agoAuto merge of #6760 - rust-lang:dependabot/cargo/toml-0.5.0, r=dwijnand
bors [Mon, 18 Mar 2019 06:44:55 +0000 (06:44 +0000)]
Auto merge of #6760 - rust-lang:dependabot/cargo/toml-0.5.0, r=dwijnand

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

*Sourced from [toml's releases](https://github.com/alexcrichton/toml-rs/releases).*

> ## Preserve order feature, minor fixes
> - Add `preserve_order` Cargo feature. This retains the order of map keys in `toml::Value`. ([#278](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/278))
> - Fix issue [#279](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/279) where some duplicate table headers were accepted. Added `Deserializer::set_allow_duplicate_after_longer_table` for anyone who wants to retain the old, broken behavior. ([#280](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/280))
> - Fix case sensitivity with T, Z, and E. ([#290](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/290))
> - Add `PartialEq` to `de::Error`. ([#292](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/292))
</details>
<details>
<summary>Commits</summary>

- [`dbdcc9c`](https://github.com/alexcrichton/toml-rs/commit/dbdcc9ccc4233b4a7b3a1ce42d49fb863f1c903a) Merge pull request [#292](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/292) from omarabid/master
- [`fbc0557`](https://github.com/alexcrichton/toml-rs/commit/fbc055771b54d0c40232c87a4266fcc2ea2380e9) Add PartialEq to Toml::de
- [`4fb12b4`](https://github.com/alexcrichton/toml-rs/commit/4fb12b493edaae62a3b6fd5320e526ae7cc9542e) Merge pull request [#290](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/290) from ehuss/fix-case-sensitivity
- [`8fce90e`](https://github.com/alexcrichton/toml-rs/commit/8fce90e9cd4be4cbb12b66fedb2de72a73214f15) Fix case sensitivity with T, Z, and E.
- [`56f9afb`](https://github.com/alexcrichton/toml-rs/commit/56f9afb4d2abdf38ed3caf9f819ac8bacc290940) Merge pull request [#278](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/278) from Kerollmops/master
- [`d0977ab`](https://github.com/alexcrichton/toml-rs/commit/d0977ab1dd9720c572b2d54a51196fcdf38f7544) Merge pull request [#280](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/280) from alexcrichton/fix-duplicate
- [`7ee1c1b`](https://github.com/alexcrichton/toml-rs/commit/7ee1c1b4798f18135ee618e30ccedfdf1f365451) Fix disallowing duplicate table headers
- [`ad5ea1d`](https://github.com/alexcrichton/toml-rs/commit/ad5ea1d904d5196fa63b77e826f82c377b604602) Update build urls
- [`600c6e5`](https://github.com/alexcrichton/toml-rs/commit/600c6e58ec28c47c926b665f80f03f8e0335847a) Tweak travis config
- [`0372ba6`](https://github.com/alexcrichton/toml-rs/commit/0372ba6925aa2c6db4d27022562064e25cdc5312) Update the serde test-suite map! macro
- Additional commits viewable in [compare view](https://github.com/alexcrichton/toml-rs/compare/0.4.2...0.5.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 squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@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 toml requirement from 0.4.2 to 0.5.0
dependabot[bot] [Mon, 18 Mar 2019 05:35:49 +0000 (05:35 +0000)]
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>
5 years agoAuto merge of #6758 - dwijnand:reuse-std-env-consts-EXE_SUFFIX, r=ehuss
bors [Sun, 17 Mar 2019 16:20:05 +0000 (16:20 +0000)]
Auto merge of #6758 - dwijnand:reuse-std-env-consts-EXE_SUFFIX, r=ehuss

Reuse std::env::consts::EXE_SUFFIX

None

5 years agoReuse std::env::consts::EXE_SUFFIX
Dale Wijnand [Sat, 16 Mar 2019 21:48:30 +0000 (21:48 +0000)]
Reuse std::env::consts::EXE_SUFFIX

5 years agoAuto merge of #6753 - Eh2406:proptest, r=dwijnand
bors [Sat, 16 Mar 2019 21:18:38 +0000 (21:18 +0000)]
Auto merge of #6753 - Eh2406:proptest, r=dwijnand

Proptest 0.9.1

This is a rework of #6636 now possible do to the change in testing from #6748

5 years agoRIP, `minimal-versions` testing. You will be missed.
Eh2406 [Sat, 16 Mar 2019 20:55:37 +0000 (16:55 -0400)]
RIP, `minimal-versions` testing. You will be missed.

5 years agoFix spurious error in dirty_both_lib_and_test.
Eric Huss [Sat, 16 Mar 2019 18:00:13 +0000 (11:00 -0700)]
Fix spurious error in dirty_both_lib_and_test.

5 years agoAuto merge of #6752 - ea2973929:cargo-book-2.4-dependencies-use-2018, r=ehuss
bors [Sat, 16 Mar 2019 17:53:28 +0000 (17:53 +0000)]
Auto merge of #6752 - ea2973929:cargo-book-2.4-dependencies-use-2018, r=ehuss

Don't need extern crate in 2018

The example in 2.4 Dependencies uses `extern crate` which you don't need in edition 2018. As a beginner Rustacean I find it's confusing that so many examples are still using `extern crate` so here is a pull request to fix that.

5 years agoProptest 0.9.1
Eh2406 [Sat, 16 Mar 2019 12:00:39 +0000 (08:00 -0400)]
Proptest 0.9.1

This is a rework of #6636 now possible do to the change in testing from #6748

5 years agoDon't need extern crate in 2018
Erik Nilsson [Sat, 16 Mar 2019 11:34:54 +0000 (12:34 +0100)]
Don't need extern crate in 2018

5 years agoAuto merge of #6748 - alexcrichton:release-then-acquire, r=ehuss
bors [Fri, 15 Mar 2019 18:05:36 +0000 (18:05 +0000)]
Auto merge of #6748 - alexcrichton:release-then-acquire, r=ehuss

Release a jobserver token while locking a file

This is a possible solution to #6747, but we'll ideally get some testing
in before landing!

5 years agoRemove minimal versions build from Windows
Alex Crichton [Fri, 15 Mar 2019 15:44:11 +0000 (08:44 -0700)]
Remove minimal versions build from Windows

Looks like minimal versions don't work with the 0.6.5 release of `rand`
on Windows...

5 years agoRelease a jobserver token while locking a file
Alex Crichton [Thu, 14 Mar 2019 15:17:38 +0000 (08:17 -0700)]
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

5 years agoAuto merge of #6749 - calebcartwright:docs-publish-command, r=ehuss
bors [Fri, 15 Mar 2019 03:59:07 +0000 (03:59 +0000)]
Auto merge of #6749 - calebcartwright:docs-publish-command, r=ehuss

Minor doc fix for publish command synopsis

I think the synopsis for the [publish command doc]( https://doc.rust-lang.org/stable/cargo/commands/cargo-publish.html) should be `cargo publish` but it currently has `package` (screenshot below).

Took a shot at making the change, not positive I did it the correct way though ðŸ˜„

![image](https://user-images.githubusercontent.com/13042488/54401497-e8b8b000-4695-11e9-872a-b467968af203.png)

5 years agoUpdate cargo-publish man.
Eric Huss [Fri, 15 Mar 2019 02:11:58 +0000 (19:11 -0700)]
Update cargo-publish man.

5 years agodocs: fix publish command synopsis
calebcartwright [Fri, 15 Mar 2019 01:07:29 +0000 (20:07 -0500)]
docs: fix publish command synopsis

5 years agoAuto merge of #6740 - ehuss:package-change-detection, r=alexcrichton
bors [Wed, 13 Mar 2019 15:49:19 +0000 (15:49 +0000)]
Auto merge of #6740 - ehuss:package-change-detection, r=alexcrichton

Stricter package change detection.

This changes it so that when `cargo package` verifies that nothing has modified any source files that it hashes the files' contents instead of checking for mtime changes.  mtimes are not always reliable.

This also changes it so that it checks *all* files in the package file. Previously it skipped files based on search rules such as the `exclude` list.

Closes #6717

5 years agoAuto merge of #6742 - hugwijst:yanked_local_registry_bug, r=alexcrichton
bors [Wed, 13 Mar 2019 14:46:20 +0000 (14:46 +0000)]
Auto merge of #6742 - hugwijst:yanked_local_registry_bug, r=alexcrichton

Fix resolving yanked crates when using a local registry.

Fixes #6741.

5 years agoAuto merge of #6739 - ehuss:hg-optional, r=dwijnand
bors [Wed, 13 Mar 2019 06:52:51 +0000 (06:52 +0000)]
Auto merge of #6739 - ehuss:hg-optional, r=dwijnand

Make `hg` optional for tests.

`hg` isn't always available, make it optional.

Failed on rust's CI: https://github.com/rust-lang/rust/pull/59143#issuecomment-472265824

5 years agoFix resolving yanked crates when using a local registry.
Hugo van der Wijst [Wed, 13 Mar 2019 05:19:55 +0000 (22:19 -0700)]
Fix resolving yanked crates when using a local registry.

Fixes #6741.

5 years agoMake `hg` optional for tests.
Eric Huss [Wed, 13 Mar 2019 03:52:38 +0000 (20:52 -0700)]
Make `hg` optional for tests.

5 years agoStricter package change detection.
Eric Huss [Wed, 13 Mar 2019 03:33:45 +0000 (20:33 -0700)]
Stricter package change detection.

5 years agoRename pass_link_args to pass_cdylib_link_args
Luca Barbato [Mon, 11 Mar 2019 20:40:55 +0000 (20:40 +0000)]
Rename pass_link_args to pass_cdylib_link_args

5 years agoAuto merge of #6734 - ehuss:fingerprint-build-path-only, r=alexcrichton
bors [Mon, 11 Mar 2019 18:51:14 +0000 (18:51 +0000)]
Auto merge of #6734 - ehuss:fingerprint-build-path-only, r=alexcrichton

Fingerprint build script deps only for path packages.

#6720 introduced some protection that if there is a build script, and two commands are used (such as `cargo build` then `cargo test`), the second command would correctly get rebuilt. However, the way it was implemented relies on mtimes working correctly. A common use case is to cache built dependencies in Docker, and Docker zeros the nanoseconds from mtime when the image is saved. This caused all packages that had build scripts to get rebuilt when the Docker image runs.

The solution here is to only use the #6720 protection for local (path) packages. This runs under the assumption that mtimes need to work for those anyways.

The consequence is that the scenario in #6720 will no longer work for detecting changes in registry dependencies with build scripts. Fixing that final edge case is nontrivial. Since it is unlikely to happen often, I figure this workaround should be sufficient for now.

cc https://github.com/integer32llc/rust-playground/issues/469
cc https://github.com/rust-lang/rust/issues/59061

5 years agoAuto merge of #6358 - collin5:b4325, r=ehuss
bors [Mon, 11 Mar 2019 17:00:13 +0000 (17:00 +0000)]
Auto merge of #6358 - collin5:b4325, r=ehuss

Add --quiet option for `cargo test`

Fixes #4325

5 years agotest --quiet option with and without harness
Collins Abitekaniza [Thu, 21 Feb 2019 15:16:49 +0000 (18:16 +0300)]
test --quiet option with and without harness

5 years agoforward --quiet flag only if harness=true
Collins Abitekaniza [Thu, 21 Feb 2019 13:41:05 +0000 (16:41 +0300)]
forward --quiet flag only if harness=true

5 years agoAuto merge of #6732 - AndrewKvalheim:terminating-newline, r=ehuss
bors [Sun, 10 Mar 2019 23:13:52 +0000 (23:13 +0000)]
Auto merge of #6732 - AndrewKvalheim:terminating-newline, r=ehuss

.gitignore should end with a newline.

`.gitignore` as created by Cargo doesn't end with a newline, but it probably should.

Rationale:

  - [Why should text files end with a newline?][why]

Search terms:

  - `No newline at end of file` from Git

  [why]: https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newline

5 years agoFingerprint build script deps only for path packages.
Eric Huss [Sun, 10 Mar 2019 22:40:15 +0000 (15:40 -0700)]
Fingerprint build script deps only for path packages.

5 years agoEnd VCS ignore files with a newline
Andrew Kvalheim [Sun, 10 Mar 2019 21:21:35 +0000 (14:21 -0700)]
End VCS ignore files with a newline

5 years agoDocument the rustc-cdylib-link-arg key
Luca Barbato [Sun, 10 Mar 2019 21:28:37 +0000 (21:28 +0000)]
Document the rustc-cdylib-link-arg key

5 years agoRestrict the link-arg key to rustc-cdylib-link-arg for now
Luca Barbato [Fri, 8 Mar 2019 19:36:36 +0000 (19:36 +0000)]
Restrict the link-arg key to rustc-cdylib-link-arg for now

5 years agoRestrict to cdylib the link arg feature
Luca Barbato [Sun, 18 Nov 2018 09:56:20 +0000 (09:56 +0000)]
Restrict to cdylib the link arg feature

5 years agoAdd cargo:rustc-link-arg to pass custom linker arguments
Luca Barbato [Fri, 9 Nov 2018 21:40:12 +0000 (21:40 +0000)]
Add cargo:rustc-link-arg to pass custom linker arguments

It is useful to produce correct cdylibs on platforms such as Linux and
MacOS.

5 years agoAuto merge of #6694 - ordovicia:misspell-env-var, r=dwijnand
bors [Thu, 7 Mar 2019 17:13:00 +0000 (17:13 +0000)]
Auto merge of #6694 - ordovicia:misspell-env-var, r=dwijnand

Emit warning on misspelled environment variables

This PR makes Cargo emit a warning when `RUST_FLAGS` or `RUSTDOC_FLAGS` environment variables are used instead of `RUSTFLAGS` or `RUSTDOCFLAGS`.

```shell
$ RUST_FLAGS=foo ./target/debug/cargo build
warning: Cargo does not read `RUST_FLAGS` environment variable. Did you mean `RUSTFLAGS`?
```

Fixes #6406

5 years agoAuto merge of #6724 - rust-lang:dependabot/cargo/glob-0.3.0, r=alexcrichton
bors [Thu, 7 Mar 2019 16:41:30 +0000 (16:41 +0000)]
Auto merge of #6724 - rust-lang:dependabot/cargo/glob-0.3.0, r=alexcrichton

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

- [`b003dc3`](https://github.com/rust-lang-nursery/glob/commit/b003dc3218b006f4e9eb7cff6e63e9087706615e) Merge pull request [#75](https://github-redirect.dependabot.com/rust-lang/glob/issues/75) from rust-lang-nursery/cargo/0.3.0
- [`f73ddef`](https://github.com/rust-lang-nursery/glob/commit/f73ddefe9350bf6417d5161118f1a456cc565d8d) prepare for 0.3.0 release
- [`20c2f9f`](https://github.com/rust-lang-nursery/glob/commit/20c2f9fcbe51c0b5cb21be86111e7bb06d5ca71f) Merge pull request [#73](https://github-redirect.dependabot.com/rust-lang/glob/issues/73) from rust-lang-nursery/ci/explicit-version
- [`ab51aaa`](https://github.com/rust-lang-nursery/glob/commit/ab51aaac0b5a5def89165cb1b01f93e9ca879ba6) add an explicit version to check in CI
- [`1b5b670`](https://github.com/rust-lang-nursery/glob/commit/1b5b67005343a74df4c3af788cfd8ce49d8d9548) Merge pull request [#71](https://github-redirect.dependabot.com/rust-lang/glob/issues/71) from g-s-k/clone-derive
- [`2f09a1f`](https://github.com/rust-lang-nursery/glob/commit/2f09a1f7d20f66f36fb38e790b28c72e6d8fcb68) ran cargo fmt
- [`3c53061`](https://github.com/rust-lang-nursery/glob/commit/3c53061d360e7578c5696935647db67d4dbf91cf) removed borrow in doctest
- [`507a084`](https://github.com/rust-lang-nursery/glob/commit/507a08477975f59feacd973075ddb071b5c556d6) don't assume `macos` target os has a /root directory
- [`1b7759c`](https://github.com/rust-lang-nursery/glob/commit/1b7759c389f5f612320c72170efa7c0583028c29) fix borrow/pass-by-value errors in tests
- [`0d6f408`](https://github.com/rust-lang-nursery/glob/commit/0d6f408324054bbe62d1533aa7526ce17ed1761f) use !is_empty rather than len > 0, for _ in &_ rather than for _ in _.iter()
- Additional commits viewable in [compare view](https://github.com/rust-lang/glob/compare/0.2.11...0.3.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 squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@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 glob requirement from 0.2.11 to 0.3.0
dependabot[bot] [Thu, 7 Mar 2019 05:50:26 +0000 (05:50 +0000)]
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>
5 years agoAuto merge of #6721 - ehuss:doc-test-relax, r=dwijnand
bors [Wed, 6 Mar 2019 19:24:30 +0000 (19:24 +0000)]
Auto merge of #6721 - ehuss:doc-test-relax, r=dwijnand

Relax some rustdoc tests.

Unblocks rust-lang/rust#56732 which makes a minor change to the output for rustdoc. These tests are being a little overly specific, reduce them to checking just the important part.

5 years agoRelax some rustdoc tests.
Eric Huss [Wed, 6 Mar 2019 18:49:24 +0000 (10:49 -0800)]
Relax some rustdoc tests.

5 years agoAuto merge of #6720 - ehuss:build-script-fingerprint, r=alexcrichton
bors [Wed, 6 Mar 2019 17:01:23 +0000 (17:01 +0000)]
Auto merge of #6720 - ehuss:build-script-fingerprint, r=alexcrichton

Include build script execution in the fingerprint.

This adds information about the execution of a build script to the fingerprint. Previously, no information was included, and cargo relied on dirty propagation in `JobQueue` to trigger recompiles. However, if two separate targets are built via separate commands (such as `cargo build` then `cargo test`), the second command did not know that the build script was updated, and thus was incorrectly treated as "fresh".

This works by including the timestamp of the last time the build script was ran in the fingerprint. For overridden build scripts, it includes the replaced output.

Fixes #4979

5 years agoAuto merge of #6653 - Eh2406:min-pub-dep, r=alexcrichton
bors [Wed, 6 Mar 2019 03:24:32 +0000 (03:24 +0000)]
Auto merge of #6653 - Eh2406:min-pub-dep, r=alexcrichton

part of the infrastructure for public & private dependencies in the resolver

This is part of my work on public & private dependencies in the resolver from #6129. As discussed there the proptest fuzzers are happy to find exponential blow up with all the back jumping strategies I have tried. So this PR does not have a back jumping strategie nor does it have the proptest fuzzers generating public dependencies. These will both need to change for the feature to stabilize. In the meantime it gives the correct results on the cases it can handle.

With https://github.com/rust-lang/rust/pull/57586 landed there is a lot of work to do on Cargos front end. Adding a UI for this, passing the relevant things to rustc, passing it to crates.io, passing it to cargo-metadata. This is good enough to allow that work to proceed.

5 years agoInclude build script execution in the fingerprint.
Eric Huss [Wed, 6 Mar 2019 01:25:42 +0000 (17:25 -0800)]
Include build script execution in the fingerprint.

5 years agomove `check_public_visible_dependencies` to `Context`
Eh2406 [Tue, 5 Mar 2019 17:58:40 +0000 (12:58 -0500)]
move `check_public_visible_dependencies` to `Context`

5 years agoAuto merge of #6718 - ehuss:version-bump, r=dwijnand
bors [Tue, 5 Mar 2019 08:14:10 +0000 (08:14 +0000)]
Auto merge of #6718 - ehuss:version-bump, r=dwijnand

Bump to 0.36.0

5 years agoBump to 0.36.0
Eric Huss [Tue, 5 Mar 2019 06:12:21 +0000 (22:12 -0800)]
Bump to 0.36.0

5 years agoadd a `check_public_visible_dependencies` flag
Eh2406 [Mon, 4 Mar 2019 22:31:49 +0000 (17:31 -0500)]
add a `check_public_visible_dependencies` flag

5 years agoAuto merge of #6707 - dwijnand:test-bench-related-tweaks, r=Eh2406
bors [Sat, 2 Mar 2019 14:23:51 +0000 (14:23 +0000)]
Auto merge of #6707 - dwijnand:test-bench-related-tweaks, r=Eh2406

Some test/bench-related tweaks

Reaped from #6697

5 years agoMake cargo_test require only str slices for args
Dale Wijnand [Sun, 24 Feb 2019 12:05:44 +0000 (12:05 +0000)]
Make cargo_test require only str slices for args

5 years agoRedefine command_prelude::values in terms of ArgMatchesExt
Dale Wijnand [Sun, 24 Feb 2019 11:56:59 +0000 (11:56 +0000)]
Redefine command_prelude::values in terms of ArgMatchesExt

5 years agoadd more comments
Eh2406 [Fri, 1 Mar 2019 20:20:03 +0000 (15:20 -0500)]
add more comments

5 years agodisable public dependency checks with renamed and 'cfg({})'
Eh2406 [Mon, 18 Feb 2019 18:50:54 +0000 (13:50 -0500)]
disable public dependency checks with renamed and 'cfg({})'

5 years agoadd some comments
Eh2406 [Tue, 12 Feb 2019 19:38:24 +0000 (14:38 -0500)]
add some comments

5 years agodisable fuzzing of pub/priv deps so we can merge
Eh2406 [Mon, 11 Feb 2019 17:00:36 +0000 (12:00 -0500)]
disable fuzzing of pub/priv deps so we can merge

partial removal of 8052d756aa97efac332cefcf1c5d98871b43f1bd

5 years agohide the details of the type for Conflict
Eh2406 [Wed, 14 Nov 2018 17:32:10 +0000 (12:32 -0500)]
hide the details of the type for Conflict

5 years agodisable back jumping on pub dep error
Eh2406 [Wed, 17 Oct 2018 15:08:59 +0000 (11:08 -0400)]
disable back jumping on pub dep error

5 years agoadd a harder test.
Eh2406 [Tue, 16 Oct 2018 17:52:25 +0000 (13:52 -0400)]
add a harder test.

5 years agoget the one test to pass
Eh2406 [Mon, 15 Oct 2018 17:30:51 +0000 (13:30 -0400)]
get the one test to pass

5 years agomaintain a graph of parents so we can quickly walk to the root
Eh2406 [Mon, 8 Oct 2018 16:07:20 +0000 (12:07 -0400)]
maintain a graph of parents so we can quickly walk to the root

5 years agominimized an example
Eh2406 [Sat, 13 Oct 2018 21:34:13 +0000 (17:34 -0400)]
minimized an example

5 years agogen public deps
Eh2406 [Tue, 9 Oct 2018 21:21:46 +0000 (17:21 -0400)]
gen public deps

5 years agoAuto merge of #6703 - ehuss:links-edition-guide, r=dwijnand
bors [Thu, 28 Feb 2019 10:47:24 +0000 (10:47 +0000)]
Auto merge of #6703 - ehuss:links-edition-guide, r=dwijnand

Fix links to the permanent home of the edition guide.

5 years agoFix links to the permanent home of the edition guide.
Eric Huss [Thu, 28 Feb 2019 05:52:33 +0000 (21:52 -0800)]
Fix links to the permanent home of the edition guide.

5 years agoAuto merge of #6614 - claudijd:https_all_the_things, r=ehuss
bors [Wed, 27 Feb 2019 22:21:16 +0000 (22:21 +0000)]
Auto merge of #6614 - claudijd:https_all_the_things, r=ehuss

HTTPS all the things

Noticed that we still have a bunch of HTTP links, which could present mild MiTM risks that we can totally remove.

One short coming of this was:

cargo/src/etc/_cargo:13 "http://zsh.sourceforge.net/Doc/Release/Completion-System.html#Completion-Functions" of which does not have an HTTPS equivalent yet.

5 years agoAuto merge of #6683 - dwijnand:cargo-test-quicker-by-not-building-untested-examples...
bors [Mon, 25 Feb 2019 20:43:45 +0000 (20:43 +0000)]
Auto merge of #6683 - dwijnand:cargo-test-quicker-by-not-building-untested-examples-when-filtered, r=ehuss

Cargo test quicker by not building untested examples when filtered

Alternative to #6677
Fixes #6675
r? @ehuss

5 years agoCargo test quicker by not building untested examples when filtered
Dale Wijnand [Tue, 19 Feb 2019 18:21:58 +0000 (18:21 +0000)]
Cargo test quicker by not building untested examples when filtered

5 years agoIntroduce LibRule::Default to avoid failure mode
Dale Wijnand [Tue, 19 Feb 2019 21:19:09 +0000 (21:19 +0000)]
Introduce LibRule::Default to avoid failure mode

The other targets have a no-failure FilterRule::All, but if lib is true
and the crate doesn't have a library, then generate_targets fails hard.
Let's give library a flexible option.

5 years agoAuto merge of #6695 - ordovicia:doc-link, r=dwijnand
bors [Sun, 24 Feb 2019 08:07:17 +0000 (08:07 +0000)]
Auto merge of #6695 - ordovicia:doc-link, r=dwijnand

Link from ARCHITECTURE.md to docs.rs and github

These links should help contributors dive into Cargo internals.