]> git.proxmox.com Git - cargo.git/log
cargo.git
5 years agoAuto merge of #7131 - ehuss:remove-unused-opt-feature, r=alexcrichton
bors [Mon, 15 Jul 2019 19:38:18 +0000 (19:38 +0000)]
Auto merge of #7131 - ehuss:remove-unused-opt-feature, r=alexcrichton

Remove unused feature filter.

NOTE: Do not merge this lightly. This upended my understanding of how the resolver handles features, and I'm still not sure about it.

Remove an unused check that an optional dependency is activated.

This was originally added 4 years ago in #1812, during a time when this code iterated over the actual dependencies from `Package.dependencies()`. In #5415 this was refactored so that it gets the `deps` list directly from the Resolver, which AFAIK has already filtered out the features. IIUC, this filtering is done [here](https://github.com/rust-lang/cargo/blame/705009eb3828123cc9dbcf5b28988cc63f60b03b/src/cargo/core/resolver/dep_cache.rs#L270-L272).

5 years agoAuto merge of #7127 - alexcrichton:less-params, r=Eh2406
bors [Mon, 15 Jul 2019 14:32:43 +0000 (14:32 +0000)]
Auto merge of #7127 - alexcrichton:less-params, r=Eh2406

Remove now-unused `WorkspaceResolve`

The reason this type existed was to pass in a `Workspace`, but that's no
longer necessary!

5 years agoRemove now-unused `WorkspaceResolve`
Alex Crichton [Fri, 12 Jul 2019 20:16:17 +0000 (13:16 -0700)]
Remove now-unused `WorkspaceResolve`

The reason this type existed was to pass in a `Workspace`, but that's no
longer necessary!

5 years agoAuto merge of #7135 - ehuss:clippy-fixes, r=Eh2406
bors [Mon, 15 Jul 2019 00:50:13 +0000 (00:50 +0000)]
Auto merge of #7135 - ehuss:clippy-fixes, r=Eh2406

Fix some clippy warnings.

5 years agoFix some clippy warnings.
Eric Huss [Sun, 14 Jul 2019 22:19:33 +0000 (15:19 -0700)]
Fix some clippy warnings.

5 years agoAuto merge of #7134 - ehuss:remap-rustc, r=Eh2406
bors [Sun, 14 Jul 2019 22:04:26 +0000 (22:04 +0000)]
Auto merge of #7134 - ehuss:remap-rustc, r=Eh2406

Also ignore remap-path-prefix in metadata for `cargo rustc`.

Also ignore `--remap-path-prefix` in `cargo rustc`.  Who knew that `BuildContext` had 3 sets of arguments?

Closes #7133

5 years agoAlso ignore remap-path-prefix in metadata for `cargo rustc`.
Eric Huss [Sun, 14 Jul 2019 21:38:47 +0000 (14:38 -0700)]
Also ignore remap-path-prefix in metadata for `cargo rustc`.

5 years agoRemove unused feature filter.
Eric Huss [Sun, 14 Jul 2019 19:41:18 +0000 (12:41 -0700)]
Remove unused feature filter.

5 years agoAuto merge of #7129 - ehuss:string-reformat, r=Eh2406
bors [Sun, 14 Jul 2019 01:54:15 +0000 (01:54 +0000)]
Auto merge of #7129 - ehuss:string-reformat, r=Eh2406

Fix some formatting for some strings.

Some of these strings were formatted in a strange way by rustfmt.

Also fixed some strings missing trailing backslashes.  Specifically, the "path override for crate" string, and the strings in `http_auth_offered`.

5 years agoFix some formatting for some strings.
Eric Huss [Sat, 13 Jul 2019 23:00:47 +0000 (16:00 -0700)]
Fix some formatting for some strings.

5 years agoAuto merge of #7118 - alexcrichton:patch-bug, r=Eh2406
bors [Fri, 12 Jul 2019 20:10:19 +0000 (20:10 +0000)]
Auto merge of #7118 - alexcrichton:patch-bug, r=Eh2406

Handle activation conflicts for `[patch]` sources

This commit updates the resolver to ensure that it recognizes conflicts
when `[patch]` is used to augment an older version of what's already in
a source, for example. Previously the deduplication based on
semver-compatible versions didn't actually work when `[patch]` was used.
This meant that when you used `[patch]` it might not transitively affect
the entire crate graph, instead just giving you a version of a
dependency and everyone else. This violates the intention of `[patch]`!

The fix here is to catch this use case happening, when a `Dependency`
source specification mismatches an activated package we need to list a
second activation in the resolver to prevent major versions from being
selected from both the original source as well as the source of the id.

Closes #7117

5 years agoAuto merge of #7126 - ehuss:beta-git-new-root, r=alexcrichton
bors [Fri, 12 Jul 2019 18:03:38 +0000 (18:03 +0000)]
Auto merge of #7126 - ehuss:beta-git-new-root, r=alexcrichton

[BETA] Fix `cargo new` in root directory.

A temporary fix for #7049, master/nightly will (eventually) get the fix by updating libgit2.

5 years ago[BETA] Fix `cargo new` in root directory.
Eric Huss [Fri, 12 Jul 2019 17:35:06 +0000 (10:35 -0700)]
[BETA] Fix `cargo new` in root directory.

5 years agoAuto merge of #7125 - Mark-Simulacrum:remove-myfnonce, r=alexcrichton
bors [Fri, 12 Jul 2019 16:21:29 +0000 (16:21 +0000)]
Auto merge of #7125 - Mark-Simulacrum:remove-myfnonce, r=alexcrichton

Remove MyFnOnce

This is no longer needed, as `Box<dyn FnOnce(...)>` works on stable now since 1.35.

5 years agoRemove MyFnOnce
Mark Rousskov [Fri, 12 Jul 2019 15:17:33 +0000 (11:17 -0400)]
Remove MyFnOnce

5 years agoHandle activation conflicts for `[patch]` sources
Alex Crichton [Wed, 10 Jul 2019 18:18:10 +0000 (11:18 -0700)]
Handle activation conflicts for `[patch]` sources

This commit updates the resolver to ensure that it recognizes conflicts
when `[patch]` is used to augment an older version of what's already in
a source, for example. Previously the deduplication based on
semver-compatible versions didn't actually work when `[patch]` was used.
This meant that when you used `[patch]` it might not transitively affect
the entire crate graph, instead just giving you a version of a
dependency and everyone else. This violates the intention of `[patch]`!

The fix here is to catch this use case happening, when a `Dependency`
source specification mismatches an activated package we need to list a
second activation in the resolver to prevent major versions from being
selected from both the original source as well as the source of the id.

Closes #7117

5 years agoAuto merge of #7116 - alexcrichton:print-errs, r=Eh2406
bors [Wed, 10 Jul 2019 18:05:28 +0000 (18:05 +0000)]
Auto merge of #7116 - alexcrichton:print-errs, r=Eh2406

Don't suppress error messages with `-q`

If we're printing an error, make sure we always print it regardless of
verbosity settings!

Closes #7025

5 years agoDon't suppress error messages with `-q`
Alex Crichton [Wed, 10 Jul 2019 17:01:09 +0000 (10:01 -0700)]
Don't suppress error messages with `-q`

If we're printing an error, make sure we always print it regardless of
verbosity settings!

5 years agoAuto merge of #7115 - rust-lang:ehuss-patch-1, r=alexcrichton
bors [Wed, 10 Jul 2019 15:21:29 +0000 (15:21 +0000)]
Auto merge of #7115 - rust-lang:ehuss-patch-1, r=alexcrichton

Fix changelog date

Oops

5 years agoFix changelog date
Eric Huss [Wed, 10 Jul 2019 15:15:48 +0000 (08:15 -0700)]
Fix changelog date

Oops

5 years agoAuto merge of #7106 - lukaslueg:master, r=ehuss
bors [Mon, 8 Jul 2019 13:43:02 +0000 (13:43 +0000)]
Auto merge of #7106 - lukaslueg:master, r=ehuss

Update dependencies

This removes the `byteorder`-dependency, which was used in a few tests only anyway and is not needed since 1.32; also removes the `derive`-feature from the `failure`-crate, which is not needed also.

5 years agoRemove byteorder-dependency
Lukas Lueg [Sun, 7 Jul 2019 20:29:13 +0000 (22:29 +0200)]
Remove byteorder-dependency

5 years agoAuto merge of #7057 - hugwijst:apple-depinfo, r=ehuss
bors [Sat, 6 Jul 2019 17:49:25 +0000 (17:49 +0000)]
Auto merge of #7057 - hugwijst:apple-depinfo, r=ehuss

Fix overwriting .d file for binary with dSYM on apple targets.

When building a binary on targets containing `-apple-`, the resulting `.d` file gets overwritten with the dependencies of the `.dSYM` file. Eg. in the changed unit test, `foo.d` would start with `p.bin(foo).with_extension("dSYM")` instead of `p.bin(foo)`.

This PR fixes that problem by not generating `.d` dependency information files for outputs of the `DebugInfo` flavor.

5 years agoAuto merge of #7102 - ehuss:update-changelog, r=Eh2406
bors [Fri, 5 Jul 2019 19:19:17 +0000 (19:19 +0000)]
Auto merge of #7102 - ehuss:update-changelog, r=Eh2406

Update changelog.

5 years agoUpdate changelog.
Eric Huss [Fri, 5 Jul 2019 19:09:58 +0000 (12:09 -0700)]
Update changelog.

5 years agoAuto merge of #7099 - ehuss:revert-7093, r=alexcrichton
bors [Fri, 5 Jul 2019 18:42:35 +0000 (18:42 +0000)]
Auto merge of #7099 - ehuss:revert-7093, r=alexcrichton

Revert "Fix 'getting started' internal links"

This reverts commit 60f25f56b8f398e935d7e8d952c4c2e6cc0bc7d5 (#7093).

Cargo currently uses mdbook 0.1, so the links were correct.

5 years agoAuto merge of #7100 - ehuss:version-bump, r=alexcrichton
bors [Fri, 5 Jul 2019 18:06:55 +0000 (18:06 +0000)]
Auto merge of #7100 - ehuss:version-bump, r=alexcrichton

Bump to 0.39.0

5 years agoBump to 0.39.0
Eric Huss [Fri, 5 Jul 2019 17:42:46 +0000 (10:42 -0700)]
Bump to 0.39.0

5 years agoRevert "Fix 'getting started' internal links"
Eric Huss [Fri, 5 Jul 2019 17:35:40 +0000 (10:35 -0700)]
Revert "Fix 'getting started' internal links"

This reverts commit 60f25f56b8f398e935d7e8d952c4c2e6cc0bc7d5.

5 years agoAuto merge of #7098 - lukaslueg:patch-1, r=ehuss
bors [Fri, 5 Jul 2019 17:27:56 +0000 (17:27 +0000)]
Auto merge of #7098 - lukaslueg:patch-1, r=ehuss

Update dependency.rs

Typo due to copypasta

5 years agoUpdate dependency.rs
lukaslueg [Fri, 5 Jul 2019 17:08:57 +0000 (19:08 +0200)]
Update dependency.rs

Typo due to copypasta

5 years agoAuto merge of #7097 - shepmaster:patch-2, r=Eh2406
bors [Fri, 5 Jul 2019 16:46:52 +0000 (16:46 +0000)]
Auto merge of #7097 - shepmaster:patch-2, r=Eh2406

Typo

5 years agoTypo
Jake Goulding [Fri, 5 Jul 2019 16:03:35 +0000 (12:03 -0400)]
Typo

5 years agoAuto merge of #7093 - tcharding:getting-started-links, r=alexcrichton
bors [Thu, 4 Jul 2019 18:53:25 +0000 (18:53 +0000)]
Auto merge of #7093 - tcharding:getting-started-links, r=alexcrichton

Fix 'getting started' internal links

Currently the internal links do not work, the path is incorrect.

Update the path for internal links in the index file of 'getting started' section thereby fixing the links generated in HTML.

5 years agoFix 'getting started' internal links
tcharding [Wed, 3 Jul 2019 22:20:23 +0000 (08:20 +1000)]
Fix 'getting started' internal links

Currently the internal links do not work, the path is incorrect.

Update the path for internal links in the index file of 'getting started'
section thereby fixing the links generated in HTML.

5 years agoAuto merge of #7090 - nmattia:nm-misleading-comment, r=Eh2406
bors [Wed, 3 Jul 2019 15:06:42 +0000 (15:06 +0000)]
Auto merge of #7090 - nmattia:nm-misleading-comment, r=Eh2406

Fix misleading comment in testsuite

The test is actually creating crates 0,1,...29 as opposed to 0,1,...19.

5 years agoFix misleading comment in testsuite
Nicolas Mattia [Wed, 3 Jul 2019 14:11:23 +0000 (16:11 +0200)]
Fix misleading comment in testsuite

5 years agoAuto merge of #7083 - sekhat:issue/7003-allow-dirty, r=alexcrichton
bors [Mon, 1 Jul 2019 20:54:18 +0000 (20:54 +0000)]
Auto merge of #7083 - sekhat:issue/7003-allow-dirty, r=alexcrichton

improve uncommitted changes cargo-package message

fixes #7003

Explicitly state what the suggested flag `--allow-dirty`
actually does when packaging/publishing the crate. Primarily,
that the uncommitted changes are included within the resulting
package.

5 years agoimprove uncommitted changes cargo-package message
Sekhat Temporus [Mon, 1 Jul 2019 17:40:03 +0000 (18:40 +0100)]
improve uncommitted changes cargo-package message

fixes #7003

Explicitly state what the suggested flag `--allow-dirty`
actually does when packaging/publishing the crate. Primarily,
that the uncommited changes are included within the resulting
package.

5 years agoAuto merge of #7082 - ehuss:git-fetch-with-cli-env-clean, r=Eh2406
bors [Sat, 29 Jun 2019 23:09:15 +0000 (23:09 +0000)]
Auto merge of #7082 - ehuss:git-fetch-with-cli-env-clean, r=Eh2406

Clean environment when git-fetch-with-cli is used.

When the GIT_DIR environment variable is set, git-the-cli will use that instead of looking at cwd.  This can happen, for example, when using the `exec` command in `git rebase` to call cargo.  This causes cargo to fetch into the wrong directory.

Closes #7072

5 years agoClean environment when git-fetch-with-cli is used.
Eric Huss [Sat, 29 Jun 2019 20:32:21 +0000 (13:32 -0700)]
Clean environment when git-fetch-with-cli is used.

5 years agoAuto merge of #7062 - goffrie:master, r=alexcrichton
bors [Tue, 25 Jun 2019 06:28:12 +0000 (06:28 +0000)]
Auto merge of #7062 - goffrie:master, r=alexcrichton

Fix exponentiality in depend_on_deps_of_deps.

With `CARGO_BUILD_PIPELINING=true`, cargo was spending a long time (15 seconds) before starting any compilation. That is caused by a naive graph traversal in `depend_on_deps_of_deps`. Instead, let's make sure not to keep traversing the same deps. With this patch, things are fast again.

5 years agoAdd a test for build pipelining with a complex build graph.
Geoffry Song [Mon, 24 Jun 2019 20:18:24 +0000 (13:18 -0700)]
Add a test for build pipelining with a complex build graph.

5 years agoFix exponentiality in depend_on_deps_of_deps.
Geoffry Song [Sat, 22 Jun 2019 20:48:52 +0000 (13:48 -0700)]
Fix exponentiality in depend_on_deps_of_deps.

5 years agoAuto merge of #7066 - nmattia:nm/fix-typo-2, r=alexcrichton
bors [Mon, 24 Jun 2019 11:24:18 +0000 (11:24 +0000)]
Auto merge of #7066 - nmattia:nm/fix-typo-2, r=alexcrichton

Fix typo in comment

5 years agoFix typo in comment
Nicolas Mattia [Mon, 24 Jun 2019 09:30:19 +0000 (11:30 +0200)]
Fix typo in comment

5 years agoAuto merge of #7063 - matthiaskrgr:travis_fmt, r=alexcrichton
bors [Sun, 23 Jun 2019 01:42:14 +0000 (01:42 +0000)]
Auto merge of #7063 - matthiaskrgr:travis_fmt, r=alexcrichton

travis: enforce formatting of subcrates as well

5 years agoformat crates-io and cargo-test-macro subcrates
Matthias Krüger [Sat, 22 Jun 2019 22:29:52 +0000 (00:29 +0200)]
format crates-io and cargo-test-macro subcrates

5 years agotravis: run cargo fmt on subcrates as well
Matthias Krüger [Sat, 22 Jun 2019 22:28:33 +0000 (00:28 +0200)]
travis: run cargo fmt on subcrates as well

5 years agoAuto merge of #7060 - lzutao:zsh-complete-package, r=ehuss
bors [Sat, 22 Jun 2019 18:12:51 +0000 (18:12 +0000)]
Auto merge of #7060 - lzutao:zsh-complete-package, r=ehuss

_cargo: Make function style consistent

They are just white-space changes. I'm planning to bring back Zsh completion
for `-p` (package) option, which was disabled in #1713. This PR is the first
stepping stone towards that goal.

A disadvantageous is that I am just starting to learn Zsh completion system.
Guess how far can I go?

r? @ehuss

5 years ago_cargo: Explain how _cargo_cmds works
Lzu Tao [Sat, 22 Jun 2019 18:01:58 +0000 (01:01 +0700)]
_cargo: Explain how _cargo_cmds works

5 years ago_cargo: Fix some warnings caught by shellcheck
Lzu Tao [Sat, 22 Jun 2019 15:34:15 +0000 (22:34 +0700)]
_cargo: Fix some warnings caught by shellcheck

5 years agoAuto merge of #7061 - ehuss:update-fix-comments, r=alexcrichton
bors [Sat, 22 Jun 2019 17:28:28 +0000 (17:28 +0000)]
Auto merge of #7061 - ehuss:update-fix-comments, r=alexcrichton

Update some fix comments.

- Primary handling changed in #5824.
- cargo_as_rustc_wrapper changed in #6759.

5 years agoUpdate some fix comments.
Eric Huss [Sat, 22 Jun 2019 17:07:54 +0000 (10:07 -0700)]
Update some fix comments.

5 years ago_cargo: Make function style consistent
Lzu Tao [Sat, 22 Jun 2019 13:40:40 +0000 (20:40 +0700)]
_cargo: Make function style consistent

5 years agoFix overwriting binary .d file for dSYM target on apple targets.
Hugo van der Wijst [Fri, 21 Jun 2019 15:19:24 +0000 (08:19 -0700)]
Fix overwriting binary .d file for dSYM target on apple targets.

5 years agoAuto merge of #7056 - ehuss:default-run-stabilize, r=alexcrichton
bors [Fri, 21 Jun 2019 20:53:30 +0000 (20:53 +0000)]
Auto merge of #7056 - ehuss:default-run-stabilize, r=alexcrichton

Stabilize default-run

This stabilizes the default-run feature.

I've included some error message changes. If `default-run` specifies an unknown binary, it now tells you that the `default-run` field is incorrect and which manifest it is located in, instead of just saying "could not determine which binary to run".

I also consolidated some of the suggestion code so it is not repeated all over.

Closes #7032

5 years agoStabilize default-run
Eric Huss [Fri, 21 Jun 2019 18:36:53 +0000 (11:36 -0700)]
Stabilize default-run

5 years agoAuto merge of #7054 - nmattia:nm/fix-typo, r=Eh2406
bors [Fri, 21 Jun 2019 14:32:26 +0000 (14:32 +0000)]
Auto merge of #7054 - nmattia:nm/fix-typo, r=Eh2406

Fix typo in comment

5 years agoFix typo in comment
Nicolas Mattia [Fri, 21 Jun 2019 14:26:44 +0000 (16:26 +0200)]
Fix typo in comment

5 years agoAuto merge of #7050 - schomatis:fix/fingerprint/dont-update-intermediate-artifacts...
bors [Fri, 21 Jun 2019 14:07:02 +0000 (14:07 +0000)]
Auto merge of #7050 - schomatis:fix/fingerprint/dont-update-intermediate-artifacts-mtime, r=Eh2406

fix(fingerpring): do not touch intermediate artifacts

Fixes https://github.com/rust-lang/cargo/issues/6972.

The newly introduced [test](https://github.com/rust-lang/cargo/pull/7050/commits/9aa7a4dce5f47e49c4100ff18a9dc0dc5a47efc4) is [failing](https://travis-ci.com/rust-lang/cargo/jobs/209849725#L2569-L2580) as discussed in https://github.com/rust-lang/cargo/issues/6972#issuecomment-502241124 (replicating the issue). Removing the `touching of intermediate artifacts` as suggested fixes the issue, but makes the old test `simple_deps_cleaner_does_not_rebuild` fail. The `simple_deps_cleaner_does_not_rebuild` test is not needed anymore so it's removed.

r? @Eh2406

5 years agofix(fingerprint): rustfmt
Lucas Molas [Fri, 21 Jun 2019 03:40:30 +0000 (00:40 -0300)]
fix(fingerprint): rustfmt

5 years agotest(freshness): remove `simple_deps_cleaner_does_not_rebuild`
Lucas Molas [Fri, 21 Jun 2019 03:15:59 +0000 (00:15 -0300)]
test(freshness): remove `simple_deps_cleaner_does_not_rebuild`

Now that the `mtime` of intermediate artifacts is not updated there's no need
for this test anymore (it now fails because without the `mtime`s it cannot
perform the intended  GC operation).

5 years agofix(fingerpring): do not touch intermediate artifacts
Lucas Molas [Mon, 17 Jun 2019 18:42:52 +0000 (15:42 -0300)]
fix(fingerpring): do not touch intermediate artifacts

5 years agotest(freshness): check that updating dependency mtime does not rebuild
Lucas Molas [Fri, 21 Jun 2019 02:14:28 +0000 (23:14 -0300)]
test(freshness): check that updating dependency mtime does not rebuild

5 years agoAuto merge of #7045 - Eh2406:resolver-test/debug-cleanup, r=alexcrichton
bors [Fri, 21 Jun 2019 01:30:05 +0000 (01:30 +0000)]
Auto merge of #7045 - Eh2406:resolver-test/debug-cleanup, r=alexcrichton

Resolver test/debug cleanup

This is several small things salvaged from abandoned PRs and implemented on top of #7011

In working on this I noted that the prop tests are very sensitive to whether backtrace are turned on. Maybe we should set that env to 0 for that builder?

5 years agocheck is_public vs Kind more carefully
Eh2406 [Thu, 20 Jun 2019 17:58:51 +0000 (13:58 -0400)]
check is_public vs Kind more carefully

5 years agoAuto merge of #7048 - jeremystucki:into_url, r=Eh2406
bors [Thu, 20 Jun 2019 16:40:51 +0000 (16:40 +0000)]
Auto merge of #7048 - jeremystucki:into_url, r=Eh2406

Rename to_url → into_url

I think it should be `into_url` as it consumes itself.

[Relevant clippy lint](https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention)

5 years agoMake rustfmt happy
Jeremy Stucki [Thu, 20 Jun 2019 16:23:55 +0000 (18:23 +0200)]
Make rustfmt happy

5 years agoAuto merge of #7047 - jeremystucki:needless-lifetimes, r=Eh2406
bors [Thu, 20 Jun 2019 15:43:09 +0000 (15:43 +0000)]
Auto merge of #7047 - jeremystucki:needless-lifetimes, r=Eh2406

Remove needless lifetimes

5 years agoRename to_url -> into_url
Jeremy Stucki [Thu, 20 Jun 2019 14:30:24 +0000 (16:30 +0200)]
Rename to_url -> into_url

5 years agoIndicate anonymous lifetime
Jeremy Stucki [Thu, 20 Jun 2019 14:46:46 +0000 (16:46 +0200)]
Indicate anonymous lifetime

5 years agoRemove needless lifetimes
Jeremy Stucki [Thu, 20 Jun 2019 12:03:09 +0000 (14:03 +0200)]
Remove needless lifetimes

5 years agocheck that the SAT solver exempts the result from the resolver
Eh2406 [Wed, 19 Jun 2019 20:53:09 +0000 (16:53 -0400)]
check that the SAT solver exempts the result from the resolver

5 years agooptimize `conflict_store` for looking up only older matches
Eh2406 [Wed, 19 Jun 2019 16:55:43 +0000 (12:55 -0400)]
optimize `conflict_store` for looking up only older matches

5 years agoAuto merge of #7042 - ehuss:no-global-rm-rf, r=alexcrichton
bors [Wed, 19 Jun 2019 16:22:59 +0000 (16:22 +0000)]
Auto merge of #7042 - ehuss:no-global-rm-rf, r=alexcrichton

Revert test directory cleaning change.

#6900 changed it so that the entire `cit` directory was cleaned once when tests started. Previously, each `t#` directory was deleted just before each test ran. This restores the old behavior due to problems on Windows.

The problem is that the call to `rm_rf` would fail with various errors ("Not found", "directory not empty", etc.) if you run `cargo test` twice. The first panic would poison the lazy static initializer, causing all subsequent tests to fail.

There are a variety of reasons deleting a file on Windows is difficult. My hypothesis in this case is that services like the indexing service and Defender swoop in and temporarily hold handles to files. This seems to be worse on slower systems, where presumably these services take longer to process all the files created by the test suite. It may also be related to how files are "marked for deletion" but are not immediately deleted.

The solution here is to spread out the deletion over time, giving Windows more of an opportunity to release its handles. This is a poor solution, and should only help reduce the frequency, but not entirely fix it.

I believe that this cannot be solved using `DeleteFileW`. There are more details at https://github.com/rust-lang/rust/issues/29497, which is a long-standing problem that there are no good Rust implementations for recursively deleting a directory.

An example of something that implements a "safe" delete is [Cygwin's unlink implementation](https://github.com/cygwin/cygwin/blob/ad101bcb0f55f0eb1a9f60187f949c3decd855e4/winsup/cygwin/syscalls.cc#L675-L1064). As you can see, it is quite complex. Of course our use case does not need to handle quite as many edge cases, but I think any implementation is going to be nontrivial, and require Windows-specific APIs not available in std.

Note: Even before #6900 I still get a lot of errors on a slow VM (particularly "directory not empty"), with Defender and Indexing off. I'm not sure why. This PR should make it more bearable, though.

5 years agodont have arg if it is all ways `pkg_id("root")`
Eh2406 [Wed, 19 Jun 2019 15:59:33 +0000 (11:59 -0400)]
dont have arg if it is all ways `pkg_id("root")`

5 years ago`conflicting_activations` should always apply to `cx`
Eh2406 [Wed, 19 Jun 2019 15:34:58 +0000 (11:34 -0400)]
`conflicting_activations` should always apply to `cx`

This is a small assert, but it scuttled a pub/priv deps PR, so lets do it all the time.

5 years ago`cur` is not as helpful as `age` when debugging
Eh2406 [Tue, 18 Jun 2019 21:30:07 +0000 (17:30 -0400)]
`cur` is not as helpful as `age` when debugging

5 years agoAuto merge of #7041 - michaellass:patch-1, r=ehuss
bors [Tue, 18 Jun 2019 21:31:24 +0000 (21:31 +0000)]
Auto merge of #7041 - michaellass:patch-1, r=ehuss

cargo book /reference/manifest: fix typo

5 years agoRevert test directory cleaning change.
Eric Huss [Tue, 18 Jun 2019 21:14:24 +0000 (14:14 -0700)]
Revert test directory cleaning change.

5 years agocargo book /reference/manifest: fix typo
Michael Lass [Tue, 18 Jun 2019 20:45:21 +0000 (22:45 +0200)]
cargo book /reference/manifest: fix typo

5 years agoAuto merge of #7011 - alexcrichton:resolver-extract, r=Eh2406
bors [Tue, 18 Jun 2019 17:51:36 +0000 (17:51 +0000)]
Auto merge of #7011 - alexcrichton:resolver-extract, r=Eh2406

Extract resolver tests to their own crate

These tests take a good amount of time to run locally and they're also
causing a lot of dependencies to get pulled into rust-lang/rust, so
let's have a separate crate that we just test on our own CI

5 years agoExtract resolver tests to their own crate
Alex Crichton [Wed, 5 Jun 2019 19:54:56 +0000 (12:54 -0700)]
Extract resolver tests to their own crate

These tests take a good amount of time to run locally and they're also
causing a lot of dependencies to get pulled into rust-lang/rust, so
let's have a separate crate that we just test on our own CI

5 years agoMove the `crates-io` crate to a `crates` directory
Alex Crichton [Wed, 5 Jun 2019 19:45:52 +0000 (12:45 -0700)]
Move the `crates-io` crate to a `crates` directory

That way when we add more crates we've got a place to put them!

5 years agoAuto merge of #7038 - lzutao:ci-fmt, r=alexcrichton
bors [Mon, 17 Jun 2019 23:56:11 +0000 (23:56 +0000)]
Auto merge of #7038 - lzutao:ci-fmt, r=alexcrichton

ci: Do not install addons on rustfmt build jobs

5 years agoci: Do not install addons on rustfmt build jobs
Lzu Tao [Mon, 17 Jun 2019 16:13:06 +0000 (23:13 +0700)]
ci: Do not install addons on rustfmt build jobs

5 years agoAuto merge of #7030 - Mark-Simulacrum:support-new-dep-info, r=alexcrichton
bors [Fri, 14 Jun 2019 23:36:31 +0000 (23:36 +0000)]
Auto merge of #7030 - Mark-Simulacrum:support-new-dep-info, r=alexcrichton

Support absolute paths in dep-info files

These changes are a little more invasive then I would've liked, but I couldn't come up with a significantly better way to structure this. Comments (or backwards-compat) concerns are appreciated, of course!

cc https://github.com/rust-lang/rust/pull/61727

r? @alexcrichton

5 years agoSupport rustc emitting dep-info for binary dependencies
Mark Rousskov [Wed, 12 Jun 2019 19:14:54 +0000 (13:14 -0600)]
Support rustc emitting dep-info for binary dependencies

rustc wants to provide sysroot dependencies and perhaps eventually
statically/dynamically linked C libraries discovered in library serach
paths to Cargo. Mostly this is only useful today for rustbuild as
otherwise Cargo's assumption that the sysroot is only changed if `rustc`
itself changes is pretty much always correct.

5 years agoAuto merge of #7033 - lzutao:fmt-workspace, r=alexcrichton
bors [Thu, 13 Jun 2019 23:23:24 +0000 (23:23 +0000)]
Auto merge of #7033 - lzutao:fmt-workspace, r=alexcrichton

ci: Run cargo fmt on all workspaces

5 years agoci: Run cargo fmt on all workspaces
Lzu Tao [Thu, 13 Jun 2019 17:10:18 +0000 (00:10 +0700)]
ci: Run cargo fmt on all workspaces

5 years agoAuto merge of #7031 - lzutao:deprecated-once-init, r=ehuss
bors [Thu, 13 Jun 2019 15:02:25 +0000 (15:02 +0000)]
Auto merge of #7031 - lzutao:deprecated-once-init, r=ehuss

Deprecated ONCE_INIT in favor of Once::new()

cc rust-lang/rust#61757

5 years agoUse Once::new instead of ONCE_INIT
Lzu Tao [Thu, 13 Jun 2019 05:54:23 +0000 (12:54 +0700)]
Use Once::new instead of ONCE_INIT

5 years agoAuto merge of #7026 - ehuss:publish-lockfile-stabilize, r=alexcrichton
bors [Tue, 11 Jun 2019 14:06:10 +0000 (14:06 +0000)]
Auto merge of #7026 - ehuss:publish-lockfile-stabilize, r=alexcrichton

Stabilize publish-lockfile.

This stabilizes the publish-lockfile feature. Specifically:

- Makes `Cargo.lock` included by default for packages with executables.
- Deprecates the `publish-lockfile` manifest key. It is no longer used.

Additional notes:

- Fixed issue where if a `Cargo.lock` file didn't exist, `cargo package` would fail the
  VCS dirty check.
- Changed it so that `cargo publish` or `cargo package` will now show manifest
  warnings. I believe this was an oversight.

Closes #5654

5 years agoAuto merge of #7029 - matthiaskrgr:lock, r=Eh2406
bors [Tue, 11 Jun 2019 13:39:08 +0000 (13:39 +0000)]
Auto merge of #7029 - matthiaskrgr:lock, r=Eh2406

change package cache lock message

Change the message from
waiting for file lock on package cache lock
to
waiting for file lock on package cache

The former message made it sound like the lock itself had a lock.

5 years agotweak lock message
Matthias Krüger [Tue, 11 Jun 2019 12:24:12 +0000 (14:24 +0200)]
tweak lock message

Change the message from
waiting for file lock on package cache lock
to
waiting for file lock on package cache

5 years agoremove unused lifetime
Matthias Krüger [Tue, 11 Jun 2019 12:19:59 +0000 (14:19 +0200)]
remove unused lifetime

5 years agoStabilize publish-lockfile.
Eric Huss [Mon, 10 Jun 2019 19:38:51 +0000 (12:38 -0700)]
Stabilize publish-lockfile.

5 years agoAuto merge of #7023 - ehuss:doc-example, r=alexcrichton
bors [Mon, 10 Jun 2019 14:04:22 +0000 (14:04 +0000)]
Auto merge of #7023 - ehuss:doc-example, r=alexcrichton

Fix documenting an example.

It was missing the dependency on the local library.

Fixes #7014.

5 years agoFix documenting an example.
Eric Huss [Sat, 8 Jun 2019 21:18:51 +0000 (14:18 -0700)]
Fix documenting an example.