8035 Commits

Author SHA1 Message Date
Matthias Krüger
51a56a452d format crates-io and cargo-test-macro subcrates 2019-06-23 00:29:52 +02:00
Matthias Krüger
cbc4589c4c travis: run cargo fmt on subcrates as well 2019-06-23 00:28:33 +02:00
bors
5277137d85 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.
2019-06-22 17:28:28 +00:00
Eric Huss
247063c35b Update some fix comments. 2019-06-22 10:07:54 -07:00
bors
973356143c 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
2019-06-21 20:53:30 +00:00
Eric Huss
7d7fe6797a Stabilize default-run 2019-06-21 11:36:53 -07:00
bors
142603ae22 Auto merge of #7054 - nmattia:nm/fix-typo, r=Eh2406
Fix typo in comment
2019-06-21 14:32:26 +00:00
Nicolas Mattia
df4775954f Fix typo in comment 2019-06-21 16:26:44 +02:00
bors
797ea153bf 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](9aa7a4dce5) 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
2019-06-21 14:07:02 +00:00
Lucas Molas
009876a88a fix(fingerprint): rustfmt 2019-06-21 00:40:30 -03:00
Lucas Molas
8343fb7396 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).
2019-06-21 00:15:59 -03:00
Lucas Molas
78927e6b15 fix(fingerpring): do not touch intermediate artifacts 2019-06-20 23:40:05 -03:00
Lucas Molas
9aa7a4dce5 test(freshness): check that updating dependency mtime does not rebuild 2019-06-20 23:34:45 -03:00
bors
37cb9bbe24 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?
2019-06-21 01:30:05 +00:00
Eh2406
cb95f5ef7c check is_public vs Kind more carefully 2019-06-20 13:58:51 -04:00
bors
eebd1da3a8 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)
2019-06-20 16:40:51 +00:00
Jeremy Stucki
2415a2980f
Make rustfmt happy 2019-06-20 18:23:55 +02:00
bors
92427df835 Auto merge of #7047 - jeremystucki:needless-lifetimes, r=Eh2406
Remove needless lifetimes
2019-06-20 15:43:09 +00:00
Jeremy Stucki
930134c75b
Rename to_url -> into_url 2019-06-20 16:53:24 +02:00
Jeremy Stucki
e97fef0239
Indicate anonymous lifetime 2019-06-20 16:46:46 +02:00
Jeremy Stucki
90e6bc6d01
Remove needless lifetimes 2019-06-20 14:03:09 +02:00
Eh2406
034c5908d8 check that the SAT solver exempts the result from the resolver 2019-06-19 16:58:25 -04:00
Eh2406
f203deaa05 optimize conflict_store for looking up only older matches 2019-06-19 13:02:08 -04:00
bors
2ee292f068 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](ad101bcb0f/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.
2019-06-19 16:22:59 +00:00
Eh2406
f4bd3a4c6e dont have arg if it is all ways pkg_id("root") 2019-06-19 11:59:33 -04:00
Eh2406
5a30d17238 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.
2019-06-19 11:34:58 -04:00
Eh2406
1a1ba8054b cur is not as helpful as age when debugging 2019-06-19 10:21:00 -04:00
bors
a3ea13595d Auto merge of #7041 - michaellass:patch-1, r=ehuss
cargo book /reference/manifest: fix typo
2019-06-18 21:31:24 +00:00
Eric Huss
00822903bb Revert test directory cleaning change. 2019-06-18 14:14:24 -07:00
Michael Lass
809486bdf8
cargo book /reference/manifest: fix typo 2019-06-18 22:45:21 +02:00
bors
22a8715a8b 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
2019-06-18 17:51:36 +00:00
Alex Crichton
290a727ad0 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
2019-06-18 10:50:48 -07:00
Alex Crichton
e449cb23e3 Move the crates-io crate to a crates directory
That way when we add more crates we've got a place to put them!
2019-06-18 10:47:44 -07:00
bors
0a9d3aed38 Auto merge of #7038 - lzutao:ci-fmt, r=alexcrichton
ci: Do not install addons on rustfmt build jobs
2019-06-17 23:56:11 +00:00
Lzu Tao
762b885c07 ci: Do not install addons on rustfmt build jobs 2019-06-17 23:13:06 +07:00
bors
b1add4b953 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
2019-06-14 23:36:31 +00:00
Mark Rousskov
34fd5cc8aa 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.
2019-06-14 13:37:05 -06:00
bors
fa05862cd0 Auto merge of #7033 - lzutao:fmt-workspace, r=alexcrichton
ci: Run cargo fmt on all workspaces
2019-06-13 23:23:24 +00:00
Lzu Tao
b01f5950b1 ci: Run cargo fmt on all workspaces 2019-06-14 00:10:21 +07:00
bors
bdacee4026 Auto merge of #7031 - lzutao:deprecated-once-init, r=ehuss
Deprecated ONCE_INIT in favor of Once::new()

cc rust-lang/rust#61757
2019-06-13 15:02:25 +00:00
Lzu Tao
ca0a0afd22 Use Once::new instead of ONCE_INIT 2019-06-13 12:54:23 +07:00
bors
807429e1b6 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
2019-06-11 14:06:10 +00:00
bors
7be4ca27c8 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.
2019-06-11 13:39:08 +00:00
Matthias Krüger
62098421d7 tweak lock message
Change the message from
waiting for file lock on package cache lock
to
waiting for file lock on package cache
2019-06-11 14:24:12 +02:00
Matthias Krüger
9066c62e7c remove unused lifetime 2019-06-11 14:19:59 +02:00
Eric Huss
34307c6122 Stabilize publish-lockfile. 2019-06-10 13:19:18 -07:00
bors
28adaba748 Auto merge of #7023 - ehuss:doc-example, r=alexcrichton
Fix documenting an example.

It was missing the dependency on the local library.

Fixes #7014.
2019-06-10 14:04:22 +00:00
Eric Huss
a59ea45c1a Fix documenting an example. 2019-06-08 14:18:51 -07:00
bors
d5723eb81a Auto merge of #6900 - jethrogb:nonconcurrent-tests, r=ehuss
Fix nonconcurrent tests

The cargo testsuite relies on a clean test “root” for every test (i.e. `#[test]`-annotated function). It relied on the `test` crate's behavior to spawn a new thread for each test, which isn't done when tests aren't run concurrently, breaking the test suite. In this PR, I'm using backtraces to figure out which test is being run, which is much more robust. I also cleaned up the root initialization logic so that it no longer recursive calls the `init` function.

Fixes #6746
2019-06-07 20:31:55 +00:00
Eric Huss
a8c22ca1e8 Update to allow publishing cargo-test-macro. 2019-06-07 13:22:10 -07:00