]> git.proxmox.com Git - cargo.git/log
cargo.git
4 years agomove `public_dependency`s code to methods for better organization
Eh2406 [Fri, 24 May 2019 21:40:38 +0000 (17:40 -0400)]
move `public_dependency`s code to methods for better organization

Note: this commit does not change code, just moves it

4 years agoAuto merge of #7454 - ehuss:version-bump, r=alexcrichton
bors [Fri, 27 Sep 2019 16:27:16 +0000 (16:27 +0000)]
Auto merge of #7454 - ehuss:version-bump, r=alexcrichton

Bump to 0.41.0, Update changelog

4 years agoBump to 0.41.0, Update changelog
Eric Huss [Fri, 27 Sep 2019 16:02:13 +0000 (09:02 -0700)]
Bump to 0.41.0, Update changelog

4 years agoAuto merge of #7452 - pyrrho:bug7346/transitive_patches, r=Eh2406
bors [Fri, 27 Sep 2019 14:44:25 +0000 (14:44 +0000)]
Auto merge of #7452 - pyrrho:bug7346/transitive_patches, r=Eh2406

Bug7346/transitive patches

Fixes #7346.

A cursory comparison between current stable and nightly shows that projects with this topology resolve similarly. If there are other behaviors I should test, I'd be happy to expand that section. This is a pretty focused change, though, so I'm not sure what else there is to break.

Sorry about the delay in putting this PR together. Good news is I know more than I did last week.

4 years agoAuto merge of #7448 - ehuss:gitignore-lockfile, r=alexcrichton
bors [Fri, 27 Sep 2019 14:18:00 +0000 (14:18 +0000)]
Auto merge of #7448 - ehuss:gitignore-lockfile, r=alexcrichton

Allow gitignore of Cargo.lock with explicit `include`.

If a package has an `include` list, but `Cargo.lock` is in `.gitignore`, then Cargo would complain that `Cargo.lock` is "dirty".  This changes it so that ignored `Cargo.lock` is allowed, even though it is still packaged.  This is under the presumption that `Cargo.lock` is machine generated, so it is not critical.  This was also an unexpected regression.

If you don't have an `include` list, then there is no complaint about `Cargo.lock` being dirty because Cargo uses git to deduce the file list, and `Cargo.lock` would be skipped for the dirty check (but still included in the package).

Closes #7319

4 years agoDon't panic on a non-fatal error
Drew Pirrone-Brusse [Thu, 26 Sep 2019 22:32:49 +0000 (18:32 -0400)]
Don't panic on a non-fatal error

4 years agoModify Context::flag_activated to return ActivateResult
Drew Pirrone-Brusse [Thu, 26 Sep 2019 22:32:28 +0000 (18:32 -0400)]
Modify Context::flag_activated to return ActivateResult

4 years agoAdd a test to model the bug found in #7346
Drew Pirrone-Brusse [Tue, 17 Sep 2019 16:55:12 +0000 (12:55 -0400)]
Add a test to model the bug found in #7346

4 years agoAllow gitignore of Cargo.lock with explicit `include`.
Eric Huss [Thu, 26 Sep 2019 21:55:59 +0000 (14:55 -0700)]
Allow gitignore of Cargo.lock with explicit `include`.

4 years agoAuto merge of #7446 - alexcrichton:quiet-output, r=Eh2406
bors [Thu, 26 Sep 2019 19:03:56 +0000 (19:03 +0000)]
Auto merge of #7446 - alexcrichton:quiet-output, r=Eh2406

Improve test output with `--quiet`

We had a few locations where the shell was written to raw instead of
through the test harness or through other captured mechanisms. This
updates the test suite so testing Cargo with `--quiet` provides a nice
and clean report of tests executed.

4 years agoAuto merge of #7445 - alexcrichton:more-stable, r=Eh2406
bors [Thu, 26 Sep 2019 18:35:26 +0000 (18:35 +0000)]
Auto merge of #7445 - alexcrichton:more-stable, r=Eh2406

Allow a number of tests to run on stable

These tests all relied on support which has now ridden to stable at this
point, so let's let them run on stable!

4 years agoImprove test output with `--quiet`
Alex Crichton [Thu, 26 Sep 2019 18:21:54 +0000 (11:21 -0700)]
Improve test output with `--quiet`

We had a few locations where the shell was written to raw instead of
through the test harness or through other captured mechanisms. This
updates the test suite so testing Cargo with `--quiet` provides a nice
and clean report of tests executed.

4 years agoAllow a number of tests to run on stable
Alex Crichton [Thu, 26 Sep 2019 18:18:53 +0000 (11:18 -0700)]
Allow a number of tests to run on stable

These tests all relied on support which has now ridden to stable at this
point, so let's let them run on stable!

4 years agoAuto merge of #7425 - alexcrichton:kind-string, r=ehuss
bors [Thu, 26 Sep 2019 17:12:00 +0000 (17:12 +0000)]
Auto merge of #7425 - alexcrichton:kind-string, r=ehuss

Refactor `Kind` to carry target name in `Target`

This commit is an internal refactoring of Cargo's compilation backend to
eventually support compiling multiple target simultaneously. The
original motivation for this came up in discussion of #7297 and this has
long been something I've intended to update Cargo for. Nothing in the
backend currently exposes the ability to actually build multiple target
simultaneously, but this should have no function change with respect to
all current consumers. Eventually we'll need to refactor APIs of how you
enter the compilation backend to compile for multiple targets.

4 years agoAuto merge of #7444 - matthiaskrgr:clippy_v8, r=Eh2406
bors [Thu, 26 Sep 2019 16:17:25 +0000 (16:17 +0000)]
Auto merge of #7444 - matthiaskrgr:clippy_v8, r=Eh2406

 fix a bunch of clippy warnings

4 years agofix a bunch of clippy warnings
Matthias Krüger [Thu, 26 Sep 2019 15:51:19 +0000 (17:51 +0200)]
fix a bunch of clippy warnings

4 years agoAddress review about doc blocks
Alex Crichton [Thu, 26 Sep 2019 15:13:32 +0000 (08:13 -0700)]
Address review about doc blocks

4 years agoRefactor how compile targets are handled
Alex Crichton [Wed, 25 Sep 2019 15:14:20 +0000 (08:14 -0700)]
Refactor how compile targets are handled

Rename `Kind` to `CompileKind` to reflect that it's intended for
compilation. Additionally change the `Target` variant to have a newtype
`CompileTarget` instead of just being a raw string. This new
`CompileTarget` type has a fallible constructor and handles custom json
target files internally.

Two accessors are available for `CompileTarget`, one is `rustc_target()`
which goes straight to rustc and everything else uses `short_name()`
which is the raw target or file stem for json files. The `short_name` is
used everywhere in Cargo for all purposes like configuration, env vars,
target directory naming, etc.

4 years agoRefactor `Kind` to carry target name in `Target`
Alex Crichton [Tue, 24 Sep 2019 17:53:32 +0000 (10:53 -0700)]
Refactor `Kind` to carry target name in `Target`

This commit is an internal refactoring of Cargo's compilation backend to
eventually support compiling multiple target simultaneously. The
original motivation for this came up in discussion of #7297 and this has
long been something I've intended to update Cargo for. Nothing in the
backend currently exposes the ability to actually build multiple target
simultaneously, but this should have no function change with respect to
all current consumers. Eventually we'll need to refactor APIs of how you
enter the compilation backend to compile for multiple targets.

4 years agoAuto merge of #7440 - alexcrichton:always-pipeline, r=ehuss
bors [Thu, 26 Sep 2019 14:55:59 +0000 (14:55 +0000)]
Auto merge of #7440 - alexcrichton:always-pipeline, r=ehuss

Remove dynamic detection of pipelining support

Pipelining has made its way to stable so no need to check that any
more.

4 years agoAuto merge of #7441 - ehuss:fix-zalgo, r=alexcrichton
bors [Thu, 26 Sep 2019 14:33:00 +0000 (14:33 +0000)]
Auto merge of #7441 - ehuss:fix-zalgo, r=alexcrichton

Fix zalgo formatting.

Now that 1.38 has hit stable, we can finally update this rustfmt change.

4 years agoFix zalgo formatting.
Eric Huss [Thu, 26 Sep 2019 14:29:37 +0000 (07:29 -0700)]
Fix zalgo formatting.

4 years agoAuto merge of #7429 - alexcrichton:fix-osx-cpu, r=ehuss
bors [Wed, 25 Sep 2019 17:00:56 +0000 (17:00 +0000)]
Auto merge of #7429 - alexcrichton:fix-osx-cpu, r=ehuss

Fix macOS collection of CPU data

There's very little documentation on `host_processor_info` from what I can tell, so I'm just cribbing examples I've found elsewhere on the internet. Turns out two things were wrong:

* One is that `host_processor_info` returns allocated memory we need to deallocate. Who knew!
* Next is that one of the out parameters, `cpu_info_cnt`, is only somehow related to the size of the return, but all example code appears to just read data regardless of what it is.

In any case this commit reads [libuv's implementation](https://github.com/libuv/libuv/blob/040543eebf4983b1459a1e0e0e26dae68b80cc28/src/unix/darwin.c#L174-L225) which if good enough for node.js is probably good enough for us.

Closes #7427

4 years agoAuto merge of #7428 - alexcrichton:nocapture, r=ehuss
bors [Wed, 25 Sep 2019 16:35:10 +0000 (16:35 +0000)]
Auto merge of #7428 - alexcrichton:nocapture, r=ehuss

Don't ever capture CPU state if timings are disabled

This should initially help with the panic in #7427 but doesn't solve it.

4 years agoAuto merge of #7421 - ehuss:build-std-sysroot, r=alexcrichton
bors [Wed, 25 Sep 2019 15:58:02 +0000 (15:58 +0000)]
Auto merge of #7421 - ehuss:build-std-sysroot, r=alexcrichton

Change build-std to use --sysroot

This transitions build-std to use `--sysroot` instead of `--extern`. This is necessary because existing crates have a certain expectation of how standard library crates are exposed. It was intended that explicit dependencies in `Cargo.toml` would solve this problem, but I didn't really consider this would be a backwards-incompatible change, so using `--sysroot` is probably the best way to go, even though it's not ideal.

Closes rust-lang/wg-cargo-std-aware#31
Closes rust-lang/wg-cargo-std-aware#40

4 years agoFix a panic collecting cpu data on OSX
Alex Crichton [Wed, 25 Sep 2019 15:37:55 +0000 (08:37 -0700)]
Fix a panic collecting cpu data on OSX

There's very little documentation on `host_processor_info` from what I
can tell, so I'm just cribbing examples I've found elsewhere on the
internet. It appears that I've misinterpreted one of the out parameters
of `host_processor_info` as the number of elements of an array, but it
actually is just something forwarded to `vm_deallocate`.

4 years agoCall `vm_deallocate` on OSX for CPU statistics
Alex Crichton [Wed, 25 Sep 2019 15:29:42 +0000 (08:29 -0700)]
Call `vm_deallocate` on OSX for CPU statistics

Apparently StackOverflow doesn't have all the answers. The examples
there I lifted this from didn't account to call `vm_deallocate` because
it looks like we're handed allocated memory! Indeed running the previous
state capture in a loop it infinitely allocated memory, but now it holds
steady when called in a loop.

4 years agoDon't ever capture CPU state if timings are disabled
Alex Crichton [Wed, 25 Sep 2019 15:18:05 +0000 (08:18 -0700)]
Don't ever capture CPU state if timings are disabled

This should initially help with the panic in #7427 but doesn't solve it.

4 years agoAdd comment for unusual placement of add_sysroot_artifact.
Eric Huss [Tue, 24 Sep 2019 22:29:04 +0000 (15:29 -0700)]
Add comment for unusual placement of add_sysroot_artifact.

4 years agoAdd some comments about Layout naming and .sysroot.
Eric Huss [Tue, 24 Sep 2019 21:49:31 +0000 (14:49 -0700)]
Add some comments about Layout naming and .sysroot.

4 years agoAuto merge of #7411 - Eh2406:mtime, r=alexcrichton
bors [Tue, 24 Sep 2019 21:14:49 +0000 (21:14 +0000)]
Auto merge of #7411 - Eh2406:mtime, r=alexcrichton

set -Zmtime_on_use from config or ENV

This lets you set the `-Zmtime_on_use` in config, it worked for me with
```toml
[unstable]
mtime_on_use=true
```
I did not find the ENV that would allow work. Suggestions?
Does this need tests?

Closes: #6978
4 years agoMore docs
Eh2406 [Tue, 24 Sep 2019 21:10:27 +0000 (17:10 -0400)]
More docs

4 years agoAdd warning when mixing -Zbuild-std with --build-plan.
Eric Huss [Tue, 24 Sep 2019 20:51:11 +0000 (13:51 -0700)]
Add warning when mixing -Zbuild-std with --build-plan.

4 years agoDon't add sysroot lib path to dylib path for build-std.
Eric Huss [Tue, 24 Sep 2019 20:50:34 +0000 (13:50 -0700)]
Don't add sysroot lib path to dylib path for build-std.

4 years agouse the newer `.get::<Option<bool>>`
Eh2406 [Tue, 24 Sep 2019 20:43:46 +0000 (16:43 -0400)]
use the newer `.get::<Option<bool>>`

4 years agoSimplify mock rustc wrapper.
Eric Huss [Tue, 24 Sep 2019 19:45:32 +0000 (12:45 -0700)]
Simplify mock rustc wrapper.

4 years agoRemove dynamic detection of pipelining support
Alex Crichton [Tue, 24 Sep 2019 18:57:18 +0000 (11:57 -0700)]
Remove dynamic detection of pipelining support

Pipelining has made its way to stable so no need to check that any
more.

4 years agoAuto merge of #7419 - alexcrichton:fix-features-regression, r=ehuss
bors [Tue, 24 Sep 2019 17:19:12 +0000 (17:19 +0000)]
Auto merge of #7419 - alexcrichton:fix-features-regression, r=ehuss

Fix interpretation of `--features a b` on the CLI

Fixes an accidental regression from #7084 where `--features a b` was
erroneously mistinterpreted as `--features "a b"`.

Closes #7418

4 years agoFix interpretation of `--features a b` on the CLI
Alex Crichton [Mon, 23 Sep 2019 19:49:14 +0000 (12:49 -0700)]
Fix interpretation of `--features a b` on the CLI

Fixes an accidental regression from #7084 where `--features a b` was
erroneously mistinterpreted as `--features "a b"`.

Closes #7418

4 years agoAuto merge of #7422 - rust-lang:dependabot/cargo/env_logger-0.7.0, r=Eh2406
bors [Tue, 24 Sep 2019 13:28:08 +0000 (13:28 +0000)]
Auto merge of #7422 - rust-lang:dependabot/cargo/env_logger-0.7.0, r=Eh2406

Update env_logger requirement from 0.6.0 to 0.7.0

Updates the requirements on [env_logger](https://github.com/sebasmagri/env_logger) to permit the latest version.
<details>
<summary>Release notes</summary>

*Sourced from [env_logger's releases](https://github.com/sebasmagri/env_logger/releases).*

> ## 0.7.0
> # Key Changes
>
> - Indent multiline messages by default
> - Support more timestamp precision
> - Update to the 2018 edition
>
> # Changes to minimum Rust
>
> The minimum version of Rust required has been set at `1.31.0`. We may change this in patch versions, but will always flag it in the release notes here.
>
> You can always check the `.travis.yml` file to see the current minimum supported version.
>
> # Contributions
>
> - [@&#8203;95ulisse](https://github.com/95ulisse) [Indentation for multiline log messages](https://github-redirect.dependabot.com/sebasmagri/env_logger/pull/134)
> - [@&#8203;oherrala](https://github.com/oherrala) [Add more timestamp precisions](https://github-redirect.dependabot.com/sebasmagri/env_logger/pull/140)
> - [Update to 2018 edition](https://github-redirect.dependabot.com/sebasmagri/env_logger/pull/142)
</details>
<details>
<summary>Commits</summary>

- [`424f031`](https://github.com/sebasmagri/env_logger/commit/424f03167401b0cff8f3da8424adc3dc1e7683d0) Merge pull request [#143](https://github-redirect.dependabot.com/sebasmagri/env_logger/issues/143) from KodrAus/cargo/0.7.0
- [`058655e`](https://github.com/sebasmagri/env_logger/commit/058655eb6875414debae568c0346038eca83c1fe) prepare for 0.7.0 release
- [`bfac641`](https://github.com/sebasmagri/env_logger/commit/bfac6411adb05b7587b5de4acea0d5c3044ef029) Merge pull request [#142](https://github-redirect.dependabot.com/sebasmagri/env_logger/issues/142) from KodrAus/feat/2018
- [`ef10fa5`](https://github.com/sebasmagri/env_logger/commit/ef10fa512ab253ca86cbb9f8f95731b64aadf323) use specific log version
- [`dc65e48`](https://github.com/sebasmagri/env_logger/commit/dc65e48bae6e13c302451d58e2002f1354d5db01) bump msrv to 1.31.0 for editions
- [`8209524`](https://github.com/sebasmagri/env_logger/commit/8209524a2898b8367b369437e7de2dd48a14edb4) update to 2018 edition
- [`7105e63`](https://github.com/sebasmagri/env_logger/commit/7105e63885e2e325f3eceddcfe0ae6ae95e1ee0f) make breaking changes to timestamp API
- [`75911d7`](https://github.com/sebasmagri/env_logger/commit/75911d7711477b7efd8d0e6eb0886b2c54a17b6f) Merge pull request [#140](https://github-redirect.dependabot.com/sebasmagri/env_logger/issues/140) from oherrala/timestamp-formats
- [`95cd4ed`](https://github.com/sebasmagri/env_logger/commit/95cd4ed266be75d64bdf05c459c44bba5d759e30) Trick the compiler to think we are using timestamp
- [`92a5b2d`](https://github.com/sebasmagri/env_logger/commit/92a5b2dfa56d6926c97f07919aed857c39ac571e) Add more timestamp precisions
- Additional commits viewable in [compare view](https://github.com/sebasmagri/env_logger/compare/v0.6.0...v0.7.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 close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor 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)
- Pull request limits (per update run and/or open at any time)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- 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>

4 years agoUpdate env_logger requirement from 0.6.0 to 0.7.0
dependabot-preview[bot] [Tue, 24 Sep 2019 05:20:49 +0000 (05:20 +0000)]
Update env_logger requirement from 0.6.0 to 0.7.0

Updates the requirements on [env_logger](https://github.com/sebasmagri/env_logger) to permit the latest version.
- [Release notes](https://github.com/sebasmagri/env_logger/releases)
- [Changelog](https://github.com/sebasmagri/env_logger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sebasmagri/env_logger/compare/v0.6.0...v0.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
4 years agoSome more --sysroot tests.
Eric Huss [Tue, 24 Sep 2019 01:29:49 +0000 (18:29 -0700)]
Some more --sysroot tests.

4 years agoChange how standard_lib tests work
Alex Crichton [Mon, 23 Sep 2019 19:07:24 +0000 (12:07 -0700)]
Change how standard_lib tests work

* Minimize the sysroot crates in play
* Don't use build scripts to inject args
* Use `RUSTC_WRAPPER` to dynamically switch `--sysroot` depending on
  whether we're building sysroot crates or not.
* Minimize dependency graph in sysroot, only have each crate depend on a
  dummy crates.io crate for testing and otherwise don't depend on
  anything to load the desired sysroot crate directly.

4 years agoChange build-std to use --sysroot.
Eric Huss [Mon, 23 Sep 2019 17:04:51 +0000 (10:04 -0700)]
Change build-std to use --sysroot.

4 years agoset mtime_on_use from config or ENV
Eh2406 [Mon, 23 Sep 2019 02:41:29 +0000 (22:41 -0400)]
set mtime_on_use from config or ENV

4 years agoAuto merge of #7407 - ehuss:update-unstable, r=alexcrichton
bors [Sun, 22 Sep 2019 00:57:58 +0000 (00:57 +0000)]
Auto merge of #7407 - ehuss:update-unstable, r=alexcrichton

Update some unstable docs

Some minor updates.

4 years agoAuto merge of #7408 - ehuss:fix-xcompile-tests, r=alexcrichton
bors [Sun, 22 Sep 2019 00:30:31 +0000 (00:30 +0000)]
Auto merge of #7408 - ehuss:fix-xcompile-tests, r=alexcrichton

Fix xcompile tests.

The new xcompile tests weren't checking whether or not cross-compiling is disabled.  Cross doesn't work on modern macos/xcode, so these were failing for me.

Also includes some minor formatting changes.

4 years agoFix xcompile tests.
Eric Huss [Sat, 21 Sep 2019 23:30:38 +0000 (16:30 -0700)]
Fix xcompile tests.

4 years agoUpdate some unstable docs
Eric Huss [Sat, 21 Sep 2019 21:22:16 +0000 (14:22 -0700)]
Update some unstable docs

4 years agoAuto merge of #7403 - ehuss:fix-timing-scale2, r=Eh2406
bors [Sat, 21 Sep 2019 18:43:24 +0000 (18:43 +0000)]
Auto merge of #7403 - ehuss:fix-timing-scale2, r=Eh2406

-Ztimings: Fix more scale problems.

Some more scaling fixes, causing the graph to be misaligned.  Also some adjustments to how the axes are labeled in extreme cases.

Closes #7401

4 years ago-Ztimings: Fix more scale problems.
Eric Huss [Sat, 21 Sep 2019 18:16:51 +0000 (11:16 -0700)]
-Ztimings: Fix more scale problems.

4 years agoAuto merge of #7397 - ehuss:fix-timing-scale, r=alexcrichton
bors [Sat, 21 Sep 2019 00:57:49 +0000 (00:57 +0000)]
Auto merge of #7397 - ehuss:fix-timing-scale, r=alexcrichton

Fix some rendering issues with -Ztimings.

- Cap the max width to 4096. This is still quite large, but should help for some large graphs failing to display for using too much memory.
- Don't allow labels to overflow past the right side of the graph.
- Fix issue for very fast builds causing an error because there aren't enough CPU_USAGE entries.
- Fix bug where `split_ticks` would enter an infinite loop (caused by small scale values). Added a counter to abort in case there are any other bugs.

Closes #7392
Closes #7388

4 years agoAuto merge of #7398 - ehuss:timings-jobs, r=alexcrichton
bors [Sat, 21 Sep 2019 00:32:40 +0000 (00:32 +0000)]
Auto merge of #7398 - ehuss:timings-jobs, r=alexcrichton

-Ztimings: show max jobs/cpus

<img width="295" alt="image" src="https://user-images.githubusercontent.com/43198/65363872-f611a280-dbc2-11e9-8abc-bb5e6e0966d0.png">

4 years agoBetter fix for overflowing text.
Eric Huss [Fri, 20 Sep 2019 23:35:08 +0000 (16:35 -0700)]
Better fix for overflowing text.

4 years ago-Ztimings: show max jobs/cpus
Eric Huss [Fri, 20 Sep 2019 23:22:42 +0000 (16:22 -0700)]
-Ztimings: show max jobs/cpus

4 years agoAuto merge of #7395 - ehuss:fix-timings-test, r=alexcrichton
bors [Fri, 20 Sep 2019 23:15:05 +0000 (23:15 +0000)]
Auto merge of #7395 - ehuss:fix-timings-test, r=alexcrichton

Fix -Ztimings with doc tests.

`cargo test -Ztimings` would crash if you have any doc tests.  This is because the `Doctest` mode unit doesn't generate any artifacts, so a map lookup was failing.

This also adds a basic test just to ensure it works.

4 years agoFix some rendering issues with -Ztimings.
Eric Huss [Fri, 20 Sep 2019 23:06:56 +0000 (16:06 -0700)]
Fix some rendering issues with -Ztimings.

- Cap the max width to 4096. This is still quite large, but should help for some large graphs failing to display for using too much memory.
- Don't allow labels to overflow past the right side of the graph.
- Fix issue for very fast builds causing an error because there aren't enough CPU_USAGE entries.
- Fix bug where `split_ticks` would enter an infinite loop (caused by small scale values). Added a counter to abort in case there are any other bugs.

4 years agoFix -Ztimings with doc tests.
Eric Huss [Fri, 20 Sep 2019 21:11:49 +0000 (14:11 -0700)]
Fix -Ztimings with doc tests.

4 years agoAuto merge of #7391 - Goirad:update-doctest-xcompile-feature-docs, r=alexcrichton
bors [Fri, 20 Sep 2019 20:47:32 +0000 (20:47 +0000)]
Auto merge of #7391 - Goirad:update-doctest-xcompile-feature-docs, r=alexcrichton

Add documentation for the -Zdoctest-xcompile feature

@alexcrichton This adds the documentation for the `doctest-xcompile` feature that (woops) didn't make it into the first pr

4 years agoAuto merge of #7394 - ehuss:fix-bin-edge, r=alexcrichton
bors [Fri, 20 Sep 2019 20:11:46 +0000 (20:11 +0000)]
Auto merge of #7394 - ehuss:fix-bin-edge, r=alexcrichton

Fix integration tests waiting for binaries to finish.

Integration tests were waiting for binaries to finish building due to a minor
logic error.

Fixes #7393

4 years agoFix integration tests waiting for binaries to finish.
Eric Huss [Fri, 20 Sep 2019 20:06:05 +0000 (13:06 -0700)]
Fix integration tests waiting for binaries to finish.

Integration tests were waiting for binaries to finish building due to a minor
logic error.

4 years agoadded documentation for the -Zdoctest-xcompile feature
Dario Gonzalez [Fri, 20 Sep 2019 18:03:32 +0000 (11:03 -0700)]
added documentation for the -Zdoctest-xcompile feature

4 years agoAuto merge of #7375 - ehuss:extract-platform, r=alexcrichton
bors [Fri, 20 Sep 2019 18:05:09 +0000 (18:05 +0000)]
Auto merge of #7375 - ehuss:extract-platform, r=alexcrichton

Extract Platform to a separate crate.

This moves the `Platform`, `Cfg`, `CfgExpr` types to a new crate named "cargo-platform".  The intent here is to give users of `cargo_metadata` a way of parsing and inspecting cargo's platform values.

Along the way, I rewrote the error handling to remove `failure`, and to slightly improve the output.

I'm having doubts whether or not this is a good idea.  As you can see from the `examples/matches.rs` example, it is nontrivial to use this (which also misses cargo's config values and environment variables).  I don't know if anyone will actually use this.  If this doesn't seem to have value, I would suggest closing it.

I've also included a sample script, `publish.py`, for publishing cargo itself.  I suspect it will need tweaking, but I figure it would be a start and open for feedback.

5 years agoAuto merge of #7390 - Eh2406:better-graph, r=alexcrichton
bors [Thu, 19 Sep 2019 21:10:09 +0000 (21:10 +0000)]
Auto merge of #7390 - Eh2406:better-graph, r=alexcrichton

change the priority in witch we build crates

On my windows 4 core, this made clean builds (of 3596cb86b2e87dd9b9c1bb90d4a9d73ec2c1512f) go from 257-223s to 210-205s. So that looks like an improvement.

5 years agoAuto merge of #7381 - alexcrichton:cpu-usage-graph, r=ehuss
bors [Thu, 19 Sep 2019 20:45:32 +0000 (20:45 +0000)]
Auto merge of #7381 - alexcrichton:cpu-usage-graph, r=ehuss

Update `-Ztimings` with CPU usage information

This commit updates the graph generated by `-Ztimings` to include CPU
usage information, ideally showing how Cargo/rustc used the CPU
throughout the build, ideally seeing nice periods of parallelism and
also periods of missed parallelism.

5 years agoless clones
Alex Crichton [Thu, 19 Sep 2019 20:43:26 +0000 (16:43 -0400)]
less clones

5 years agominimize diff
Eh2406 [Thu, 19 Sep 2019 20:30:28 +0000 (16:30 -0400)]
minimize diff

5 years agoAuto merge of #7386 - alexcrichton:less-env-leak, r=ehuss
bors [Thu, 19 Sep 2019 20:19:40 +0000 (20:19 +0000)]
Auto merge of #7386 - alexcrichton:less-env-leak, r=ehuss

Remove all `CARGO_*` env vars in tests

Usage of `CARGO_PROFILE_*` is generating unexpected warnings in tests in
rust-lang/rust#64316 so let's just blanket remove every env var that has
a `CARGO_*` prefix which generally means Cargo-specific env vars. Tests
practically all assume that they have blank configs right now.

5 years agochange the priority in witch we build crates
Eh2406 [Thu, 19 Sep 2019 19:40:13 +0000 (15:40 -0400)]
change the priority in witch we build crates

5 years agoAuto merge of #7389 - alexcrichton:less-winapi-02, r=Eh2406
bors [Thu, 19 Sep 2019 18:58:16 +0000 (18:58 +0000)]
Auto merge of #7389 - alexcrichton:less-winapi-02, r=Eh2406

Remove dependency on `winapi` 0.2

This commit removes Cargo's dependency on `winapi` 0.2 which takes an
excessively long time to build, slowing down Windows builds. The
`winapi` 0.2 crate was pulled in via a dependency chain that looked
like:

    cargo
    \- crates-io
       \- http
          \- bytes
             \- iovec
                \- winapi 0.2

The fix implemented here was to remove the `http` crate dependency from
`crates-io` which is only used for rendering status codes, but it's easy
enough to inline that function locally.

5 years agoRemove dependency on `winapi` 0.2
Alex Crichton [Thu, 19 Sep 2019 18:48:34 +0000 (11:48 -0700)]
Remove dependency on `winapi` 0.2

This commit removes Cargo's dependency on `winapi` 0.2 which takes an
excessively long time to build, slowing down Windows builds. The
`winapi` 0.2 crate was pulled in via a dependency chain that looked
like:

    cargo
    \- crates-io
       \- http
          \- bytes
             \- iovec
                \- winapi 0.2

The fix implemented here was to remove the `http` crate dependency from
`crates-io` which is only used for rendering status codes, but it's easy
enough to inline that function locally.

5 years agoRemove all `CARGO_*` env vars in tests
Alex Crichton [Thu, 19 Sep 2019 01:07:57 +0000 (18:07 -0700)]
Remove all `CARGO_*` env vars in tests

Usage of `CARGO_PROFILE_*` is generating unexpected warnings in tests in
rust-lang/rust#64316 so let's just blanket remove every env var that has
a `CARGO_*` prefix which generally means Cargo-specific env vars. Tests
practically all assume that they have blank configs right now.

5 years agoAuto merge of #7385 - ehuss:fix-tar-features, r=alexcrichton
bors [Thu, 19 Sep 2019 00:52:47 +0000 (00:52 +0000)]
Auto merge of #7385 - ehuss:fix-tar-features, r=alexcrichton

Fix some duplicate artifact problems.

The recent cargo update failed because of duplicate artifacts with rls.

`tar` should mirror what the main manifest contains.

Partially revert #7374 by adding `serde` back to `url`.  Unfortunately the `lsp-types` crate (used by rls) needs this feature.  Unless anyone has a good idea on how to handle that, I don't think it can be removed.

Unblocks cargo update, which I'd like to get done before the beta branch.

5 years agoFix `tar` duplicate artifact in rust-lang/rust.
Eric Huss [Thu, 19 Sep 2019 00:25:04 +0000 (17:25 -0700)]
Fix `tar` duplicate artifact in rust-lang/rust.

5 years agoAuto merge of #6892 - Goirad:doctest-xcompile, r=alexcrichton
bors [Wed, 18 Sep 2019 23:59:17 +0000 (23:59 +0000)]
Auto merge of #6892 - Goirad:doctest-xcompile, r=alexcrichton

Added ability to crosscompile doctests

This commit adds the ability to cross-compile and run doctests.
Like before cargo checks if target == host, the difference is that if there is a runtool defined in config.toml, it passes the information forward to rustdoc so that it can run the doctests with that tool. If no tool is defined and the target != host, cargo instead displays a message that doctests will not be compiled because of the missing runtool.

See [here](https://github.com/rust-lang/rust/pull/60387) for the companion PR in the rust project that modifies rustdoc to accept the relevant options as well as allow ignoring doctests on a per target level.
Partially resolves [#6460](https://github.com/rust-lang/cargo/issues/6460)

See [here](https://github.com/rust-lang/cargo/issues/7040) for the tracking issue.

5 years agoAuto merge of #7377 - rust-lang:dependabot/cargo/hex-0.4, r=alexcrichton
bors [Wed, 18 Sep 2019 21:45:02 +0000 (21:45 +0000)]
Auto merge of #7377 - rust-lang:dependabot/cargo/hex-0.4, r=alexcrichton

Update hex requirement from 0.3 to 0.4

Updates the requirements on [hex](https://github.com/KokaKiwi/rust-hex) to permit the latest version.
<details>
<summary>Commits</summary>

- See full diff in [compare view](https://github.com/KokaKiwi/rust-hex/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 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 close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor 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)
- Pull request limits (per update run and/or open at any time)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- 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 `-Ztimings` with CPU usage information
Alex Crichton [Tue, 17 Sep 2019 22:47:34 +0000 (15:47 -0700)]
Update `-Ztimings` with CPU usage information

This commit updates the graph generated by `-Ztimings` to include CPU
usage information, ideally showing how Cargo/rustc used the CPU
throughout the build, ideally seeing nice periods of parallelism and
also periods of missed parallelism.

5 years agoadded tests
Dario Gonzalez [Thu, 12 Sep 2019 18:08:29 +0000 (11:08 -0700)]
added tests

5 years agomoved cross-compiling doctests behind the doctest-xcompile feature flag
Dario Gonzalez [Tue, 11 Jun 2019 21:37:47 +0000 (14:37 -0700)]
moved cross-compiling doctests behind the doctest-xcompile feature flag

5 years agoAdded ability to crosscompile doctests
Dario Gonzalez [Fri, 26 Apr 2019 21:05:37 +0000 (14:05 -0700)]
Added ability to crosscompile doctests

5 years agoUpdate hex requirement from 0.3 to 0.4
dependabot-preview[bot] [Wed, 18 Sep 2019 05:15:16 +0000 (05:15 +0000)]
Update hex requirement from 0.3 to 0.4

Updates the requirements on [hex](https://github.com/KokaKiwi/rust-hex) to permit the latest version.
- [Release notes](https://github.com/KokaKiwi/rust-hex/releases)
- [Commits](https://github.com/KokaKiwi/rust-hex/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
5 years agoExtract Platform to a separate crate.
Eric Huss [Thu, 5 Sep 2019 16:02:27 +0000 (09:02 -0700)]
Extract Platform to a separate crate.

5 years agoAuto merge of #7374 - alexcrichton:less-url-serde, r=ehuss
bors [Tue, 17 Sep 2019 20:58:08 +0000 (20:58 +0000)]
Auto merge of #7374 - alexcrichton:less-url-serde, r=ehuss

Don't require the `serde` feature of `url`

Ends up meaning that in full crate compiles that `url` doesn't wait for
`serde` to finish, which in turn enables crates like `git2` to start
sooner!

5 years agoAuto merge of #7311 - ehuss:pipeline-timing, r=alexcrichton
bors [Tue, 17 Sep 2019 20:33:15 +0000 (20:33 +0000)]
Auto merge of #7311 - ehuss:pipeline-timing, r=alexcrichton

Experiment: Create timing report.

This is just an experiment, so I'm not sure if we'll want to merge it.

This adds an HTML report which gets saved to disk when the build is finished.  It is primarily geared for identifying slow dependencies, and for visualizing how pipelining affects the build.

Here's an example: https://ehuss.github.io/cargo-timing.html
You can mouse over the blocks to highlight the reverse-dependencies that are released when a unit finishes.  `syn` is a really good example.

It does a few other things, like displaying a message after each unit is finished.  See the docs for more information.

5 years agoSet min slider to step 0.1 seconds.
Eric Huss [Tue, 17 Sep 2019 20:08:56 +0000 (13:08 -0700)]
Set min slider to step 0.1 seconds.

5 years agoMove timings check to rmeta_required.
Eric Huss [Tue, 17 Sep 2019 20:01:28 +0000 (13:01 -0700)]
Move timings check to rmeta_required.

5 years agoStyle update.
Eric Huss [Tue, 17 Sep 2019 19:59:51 +0000 (12:59 -0700)]
Style update.

5 years agoRemove Option from Timings.
Eric Huss [Tue, 17 Sep 2019 19:48:26 +0000 (12:48 -0700)]
Remove Option from Timings.

5 years agoDon't require the `serde` feature of `url`
Alex Crichton [Tue, 17 Sep 2019 19:47:31 +0000 (12:47 -0700)]
Don't require the `serde` feature of `url`

Ends up meaning that in full crate compiles that `url` doesn't wait for
`serde` to finish, which in turn enables crates like `git2` to start
sooner!

5 years agoUpdate docs.
Eric Huss [Tue, 17 Sep 2019 17:53:28 +0000 (10:53 -0700)]
Update docs.

5 years agoSwitch rendering to canvas.
Eric Huss [Mon, 16 Sep 2019 22:19:10 +0000 (15:19 -0700)]
Switch rendering to canvas.

Also add some more features.

5 years agoAuto merge of #7368 - alexcrichton:canonical-urls-omg, r=ehuss
bors [Tue, 17 Sep 2019 16:42:36 +0000 (16:42 +0000)]
Auto merge of #7368 - alexcrichton:canonical-urls-omg, r=ehuss

Work with canonical URLs in `[patch]`

This commit addresses an issue with how the resolver processes `[patch]`
annotations in manifests and lock files. Previously the resolver would
use the raw `Url` coming out of a manifest, but the rest of resolution,
when comparing `SourceId`, uses a canonical form of a `Url` rather than
the actual raw `Url`. This ended up causing discrepancies like those
found in #7282.

To fix the issue all `patch` intermediate storage in the resolver uses a
newly-added `CanonicalUrl` type instead of a `Url`. This
`CanonicalUrl` is then also used throughout the codebase, and all
lookups in the resolver as switched to using `CanonicalUrl` instead of
`Url`, which...

Closes #7282

5 years agoWork with canonical URLs in `[patch]`
Alex Crichton [Mon, 16 Sep 2019 19:35:03 +0000 (12:35 -0700)]
Work with canonical URLs in `[patch]`

This commit addresses an issue with how the resolver processes `[patch]`
annotations in manifests and lock files. Previously the resolver would
use the raw `Url` coming out of a manifest, but the rest of resolution,
when comparing `SourceId`, uses a canonical form of a `Url` rather than
the actual raw `Url`. This ended up causing discrepancies like those
found in #7282.

To fix the issue all `patch` intermediate storage in the resolver uses a
newly-added `CanonicalUrl` type instead of a `Url`. This
`CanonicalUrl` is then also used throughout the codebase, and all
lookups in the resolver as switched to using `CanonicalUrl` instead of
`Url`, which...

Closes #7282

5 years agoAuto merge of #7373 - alexcrichton:clear-memos, r=ehuss
bors [Tue, 17 Sep 2019 15:32:24 +0000 (15:32 +0000)]
Auto merge of #7373 - alexcrichton:clear-memos, r=ehuss

Clear out memoized hashes before building crates

Build script updates during execution can change the memoized hash of a
`Fingerprint`, and while previously we cleared out a single build
script's memoized hash we forgot to clear out everything that depended
on it as well. This commit pessimistically clears out all `Fingerprint`
memoized hashes just before building to ensure that during the build
everything has the most up-to-date view of the world, and when build
scripts change fingerprints everything that depends on them won't have
run yet.

Closes #7362

5 years agoAuto merge of #7369 - jonas-schievink:the-little-c-that-Could, r=alexcrichton
bors [Tue, 17 Sep 2019 15:02:05 +0000 (15:02 +0000)]
Auto merge of #7369 - jonas-schievink:the-little-c-that-Could, r=alexcrichton

Uncapitalize "Could not compile" error message

"could not compile ..." matches other Cargo and rustc errors and
warnings better.

5 years agoClear out memoized hashes before building crates
Alex Crichton [Tue, 17 Sep 2019 14:04:28 +0000 (07:04 -0700)]
Clear out memoized hashes before building crates

Build script updates during execution can change the memoized hash of a
`Fingerprint`, and while previously we cleared out a single build
script's memoized hash we forgot to clear out everything that depended
on it as well. This commit pessimistically clears out all `Fingerprint`
memoized hashes just before building to ensure that during the build
everything has the most up-to-date view of the world, and when build
scripts change fingerprints everything that depends on them won't have
run yet.

Closes #7362

5 years agoUncapitalize "Could not compile" error message
Jonas Schievink [Mon, 16 Sep 2019 22:50:49 +0000 (00:50 +0200)]
Uncapitalize "Could not compile" error message

"could not compile ..." matches other Cargo and rustc errors and
warnings better.

5 years agoAuto merge of #7350 - alexcrichton:mock-std, r=ehuss
bors [Mon, 16 Sep 2019 21:10:49 +0000 (21:10 +0000)]
Auto merge of #7350 - alexcrichton:mock-std, r=ehuss

Improve test suite for `-Zbuild-std`

This commit is aimed directly at rust-lang/wg-cargo-std-aware#33 and in
general making the `-Zbuild-std` tests more robust. The main change here
is that a new source tree is checked in, `tests/testsuite/mock-std`,
which mirrors rust-lang/rust's own tree for libstd. This mock tree is as
empty as it can be, ideally duplicating almost nothing but for not
requiring duplication of Cargo metadata about patches and such.

The end result here looks like:

* All `-Zbuild-std` tests are now run in parallel
* All tests run much more quickly since they're compiling tiny crates
  instead of actually compiling libstd/libcore
* No tests require network access
* We verify that crates have access to the "custom" libraries
  that we build

Coverage of tests is not currently expanded, but it's hoped that we
could add that shortly afterwards. Coverage has actually gone down
slightly since the custom target test was commented out temporarily and
the full integration test of running `-Zbuild-std` isn't run on CI any
more.

Closes rust-lang/wg-cargo-std-aware#33

5 years agoAuto merge of #7367 - alexcrichton:less-fn-box, r=ehuss
bors [Mon, 16 Sep 2019 20:18:02 +0000 (20:18 +0000)]
Auto merge of #7367 - alexcrichton:less-fn-box, r=ehuss

Remove another `FnBox` trait

No longer needed on stable!

5 years agoRun rustfmt
Alex Crichton [Thu, 12 Sep 2019 19:52:46 +0000 (12:52 -0700)]
Run rustfmt