Commit graph

9303 commits

Author SHA1 Message Date
bors 88ba857572 Auto merge of #8350 - Mark-Simulacrum:rust-1.44.1, r=ehuss
1.44.1 stable backports

Tried to duplicate https://github.com/rust-lang/cargo/pull/8335, though had to manually adjust 3b9e8dc4c1dc6a6ec714acb6a97b4f7cffda1176 (cherry-pick of #8329) as it had a merge conflict.

Stable backports for:

* #8329 — Don't hash executable filenames on apple platforms. (fix macos backtraces)
2020-06-11 20:11:12 +00:00
Mark Rousskov 56d6aadfe5 Bump to 0.45.1 2020-06-11 15:46:10 -04:00
Mark Rousskov f5681b7120 Delete broken nightly tests 2020-06-11 14:47:47 -04:00
Eric Huss dc21706b10 Don't hash executable filenames on apple platforms. 2020-06-11 14:47:47 -04:00
bors 05d080faa4 Auto merge of #8216 - ehuss:beta-1.44-clean-p-fix, r=alexcrichton
[beta] Fix `clean -p` with a build dependency.

This is a temporary and simple fix for #8149 where `cargo clean -p foo` would fail if `foo` has a build dependency.  The full fix is in #8210, but I think that PR is way too risky to backport.
2020-05-06 19:12:48 +00:00
bors ff919113bf Auto merge of #8215 - ehuss:beta-1.44-allow-package-list, r=alexcrichton
[beta] Allow `cargo package --list` even for things that don't package.

Beta backport of #8175.
2020-05-06 18:55:17 +00:00
Eric Huss 5a6849ef09 [beta] Fix clean -p with a build dependency. 2020-05-06 11:15:49 -07:00
bors f42ed7a863 Auto merge of #8175 - ehuss:allow-package-list, r=alexcrichton
Allow `cargo package --list` even for things that don't package.

`cargo package --list` was changed in #7905 to generate `Cargo.lock` earlier. If there is a problem, then it would fail where previously it would succeed. This changes it so that file generation is deferred until after `--list`.

This also changes it so that the "dependencies must have a version" check is deferred until after `--list` as well.

Closes #8151
2020-05-06 10:32:01 -07:00
bors d97ae455a7 Auto merge of #8206 - alexcrichton:no-probe-beta, r=Eh2406
[beta] Do not probe for `-Cembed-bitcode`

This flag didn't make it to the beta branch of rustc, so remove the
probe here in Cargo. This is intended to be a very small patch to remove
the probe, since the real support is updated on master and will replace
this eventually anyway.
2020-05-04 22:26:42 +00:00
Alex Crichton 96d5b73fbd Fix compile warning 2020-05-04 14:24:14 -07:00
Alex Crichton 0944ce604c [beta] Do not probe for -Cembed-bitcode
This flag didn't make it to the beta branch of rustc, so remove the
probe here in Cargo. This is intended to be a very small patch to remove
the probe, since the real support is updated on master and will replace
this eventually anyway.
2020-05-04 14:22:56 -07:00
bors ebda5065ee Auto merge of #8119 - ehuss:new-err-formatting, r=alexcrichton
Don't use debug display for error object.

When `cargo new` displays a workspace validation warning, it was using the debug display which we probably shouldn't rely on.

This also consolidates a similar usage when `cargo doc --open` fails.

Closes #8118
2020-04-16 14:28:43 +00:00
Eric Huss b64d0f3645 Don't use debug display for error object. 2020-04-15 17:29:19 -07:00
bors 2cb9243c02 Auto merge of #8115 - ehuss:tree-backwards-compat, r=alexcrichton
Add backwards-compatibility for old cargo-tree flags.

Add backwards compatibility for the flags that were removed.

`--invert` is still not backwards compatible because it was fundamentally changed to take an argument.

Requested via https://github.com/rust-lang/cargo/pull/8062#issuecomment-613829752.
2020-04-15 20:52:38 +00:00
Eric Huss b0fa64b5e5 Add backwards-compatibility for old cargo-tree flags. 2020-04-15 13:48:58 -07:00
bors f22d17c938 Auto merge of #8114 - alexcrichton:change-condition, r=Eh2406
Try to avoid panics on buggy (?) clocks

Try to avoid panics with `Instant` by only performing infallible
operations. This tweaks a comparison located in #8042 to use `Instant`
comparisons rather than `Duration` comparisons which should hopefully
eliminate a source of panics in the face of buggy (maybe?) clocks.

I'm not sure whether this actually fixes the original issue, but seeing
that we have a pretty low chance of the issue recurring, it's probably
fine to go ahead and say...

Closes #8042
2020-04-15 15:39:33 +00:00
Alex Crichton be020a55d6 Try to avoid panics on buggy (?) clocks
Try to avoid panics with `Instant` by only performing infallible
operations. This tweaks a comparison located in #8042 to use `Instant`
comparisons rather than `Duration` comparisons which should hopefully
eliminate a source of panics in the face of buggy (maybe?) clocks.

I'm not sure whether this actually fixes the original issue, but seeing
that we have a pretty low chance of the issue recurring, it's probably
fine to go ahead and say...

Closes #8042
2020-04-15 07:54:15 -07:00
bors 74e3a7d5b7 Auto merge of #8093 - pfmooney:illumos-deps, r=alexcrichton
Update dependencies to support illumos target

Several dependencies of cargo require updates in order to build with illumos as the `target_os` platform (rust-lang/rust#55553).  Most are patch revisions to include `#[cfg()]` updates.  In the case of `fs2`, the maintainer does not appear to be minding activity on the project, so it was forked into `fs3`, maintaining the same interfaces and logic (but featuring the widened platform support).
2020-04-13 20:41:52 +00:00
Patrick Mooney c04a87c192 Update dependencies to support illumos target
This inlines the flock() logic from danburkert/fs2, which in its current
state does not compile on illumos (or certain other cfg(unix) targets).
2020-04-13 14:18:00 -05:00
bors 15d8044f05 Auto merge of #8102 - alexcrichton:more-spurious, r=Eh2406
Whitelist another known spurious curl error

Seen recently in comments on #6788
2020-04-13 16:45:48 +00:00
Alex Crichton f54ac5a26c Whitelist another known spurious curl error
Seen recently in comments on #6788
2020-04-13 09:42:26 -07:00
bors 9def590c3c Auto merge of #8098 - ehuss:fix-exported_priv_warning, r=alexcrichton
Fix nightly test matching rustc "warning" output.

https://github.com/rust-lang/rust/pull/69926 changed the warning output from rustc.  https://github.com/rust-lang/cargo/pull/8080 attempted to compensate for it, but missed one of the cases.  I don't think this test needs to be quite so exhaustive about checking the output.
2020-04-13 14:12:49 +00:00
Eric Huss 75e7b41823 Fix nightly test matching rustc "warning" output. 2020-04-12 21:09:39 -07:00
bors 12d6e84880 Auto merge of #8096 - ehuss:codegen-units-default, r=Eh2406
Update default for codegen-units.

The default for codegen-units was changed in https://github.com/rust-lang/rust/pull/70156.
2020-04-11 22:36:02 +00:00
Eric Huss 704142537c Update default for codegen-units. 2020-04-11 10:55:51 -07:00
bors 53b1c48a51 Auto merge of #8087 - ehuss:freshness-interrupted2, r=alexcrichton
Fix freshness when linking is interrupted.

Fixes a scenario where hitting Ctrl-C while linking would leave a corrupted executable, but Cargo would think it is "fresh" and fail to rebuild it.

This also includes a separate commit which adds more documentation on fingerprinting.

Fixes #7767
2020-04-10 16:33:24 +00:00
Eric Huss 14e86cc703 More fingerprint and metadata comments. 2020-04-09 15:30:41 -07:00
bors 7d720ef051 Auto merge of #8062 - ehuss:tree, r=alexcrichton
Add `cargo tree` command.

This migrates [cargo-tree](https://github.com/sfackler/cargo-tree/) into Cargo as a built-in command. This is based on a recent master (4108d216ec), and should be mostly similar in functionality. There are a variety changes:

* `--all-targets` renamed to `--no-filter-targets` to avoid confusion with the `--all-targets` flag used in other Cargo commands with a different meaning.
* `--all`/`-a` renamed to `--no-dedupe` to avoid confusion with the `-all` flag which means "all workspace crates" in other Cargo commands.
* `--duplicate` renamed to `--duplicates` (with alias), just a personal preference.
* Added support for multiple roots (workspace support).
* Added the `--graph-features` flag for including features in the graph (to "explain" why a feature is enabled).
* Added `{f}` to format string to show features.
* Handles new feature resolver.
* Handles cyclical dev dependencies.
* Added a test suite.
* Dropped the dependency on petgraph, in favor of a simpler custom graph.

Closes #7286.
2020-04-09 19:53:41 +00:00
bors 239f2bfd0c Auto merge of #8069 - ehuss:build-finished, r=alexcrichton
Add "build-finished" JSON message.

This adds a JSON message when a build is finished.  This is useful for tools to know when to stop parsing JSON, which is particularly useful for commands like `cargo test` or `cargo run` where additional output may follow.

Closes #7978
2020-04-09 19:34:39 +00:00
Eric Huss cd396f340a Fix freshness when linking is interrupted. 2020-04-09 08:46:14 -07:00
bors 3a976c1767 Auto merge of #8074 - ehuss:package-features2, r=alexcrichton
Extend -Zpackage-features with more capabilities.

This is a proposal to extend `-Zpackage-features` with new abilities to change how features are selected on the command-line.  See `unstable.md` for documentation on what it does.

I've contemplated a variety of ways we could transition this to stable. I tried a few experiments trying to make a "transition with warnings" mode, but I'm just too concerned about breaking backwards compatibility.  The current way is just fundamentally different from the new way, and I think it would be a bumpy ride to try to push it.

The stabilization story is that the parts of this that add new functionality (feature flags in virtual worskpaces, and `member/feat` syntax) can be stabilized at any time.  The change for `cargo build -p member --features feat` in a different member's directory can maybe be part of `-Zfeatures` stabilization, which will need to be opt-in.  I've been trying to come up with some transition plan, and I can't think of a way without making it opt-in, and making it part of `-Zfeatures` is an opportunity to simplify things.  One concern is that this might be confusing (`--features` flag could behave differently in different workspaces, and documenting the differences), but that seems hard to avoid.

Closes #6195
Closes #4753
Closes #5015
Closes #4106
Closes #5362
2020-04-09 15:43:07 +00:00
Eric Huss cc53ecad0b Add some more exposition on fingerprints. 2020-04-09 08:42:46 -07:00
bors 1e6ed94ad7 Auto merge of #8090 - mbStavola:invalid-dep-naming, r=alexcrichton
Disallow invalid dependency names through crate renaming

resolves #6656

As suggested in the issue, I simply checked the dep names by calling `validate_package_name` on the dependencies during the TOML deserialization process.

It might be a bit too strict (and sudden) to error out in this case, so it might be best to convert this into a warning instead. However, this _is_ pretty invalid behavior so I'm not too sure really.
2020-04-09 15:26:04 +00:00
bors da54d6b219 Auto merge of #8073 - ehuss:hash-channel, r=alexcrichton
Use the same filename hash for pre-release channels.

This changes it so that filenames do not hash the entire verbose version from rustc if they are a pre-release version. The intent is to avoid leaving stale artifacts in the target directory whenever someone updates a nightly or beta release. This should help reduce disk space usage for someone who updates these toolchains frequently.

I tested with the rustc repo, and it seems to be OK. It keeps everything in separate target directories, so I think it should be generally safe. This should only affect someone switching between different nightlies and wanting to avoid recompiling when switching back. I suspect that is a rare use case, though if there are complaints this can be easily reverted (or made a config option). cargo-bisect-rustc should also be safe since it uses a different target directory for each toolchain.

One concern here for me was incremental support. It looks like ([src](6387b09153/src/librustc_incremental/persist/file_format.rs (L88-L100))) the incremental cache includes the detailed rustc version, so I think that is safe. It also looks like it is [smart enough](6387b09153/src/librustc_incremental/persist/load.rs (L40-L49)) to delete stale files.

We will need to be more careful in the future when changing the target directory structure or the format of files. We previously relied on the fact that each new nightly will use different filenames. If we change the structure in a backwards-incompatible way, we will need to be careful to update the version (`1.hash` in `compute_metadata`).
2020-04-09 14:25:08 +00:00
Matt Stavola fcff51b3e0
Add test for bad renaming 2020-04-08 23:46:30 -07:00
Matt Stavola 420608bc70
Error on invalid dependency naming 2020-04-08 23:15:33 -07:00
Eric Huss fdfdb3ddad Add escape hatch for nightly version hashing. 2020-04-08 14:21:10 -07:00
Eric Huss 54ace8af65 Merge -Zpackage-features2 and -Zpackage-features. 2020-04-08 14:06:09 -07:00
bors fd25241d3e Auto merge of #8081 - t-nelis:index-commands-section, r=ehuss
Index the commands section
2020-04-07 19:47:54 +00:00
bors 3fc174d790 Auto merge of #8083 - t-nelis:mdbook-v0.3.7, r=ehuss
Upgrade to mdBook v0.3.7

This bumps the requirement from Rust v1.34.0 to v1.35.0 for building docs. AFAICT CI is using nightlies so that should be fine, but I thought I'd mention it in case someone thinks this impacts contributors in any way.

Other than that, there are a few changes that might impact some users in a visible way, like automatic dark theme support for those who picked that perference in their browser, possible color changes to the scrollbar and to the font size, change in the spacing in the sidebar entries, and many more changes and fixes that won't be too immediately impactful but very good all around.

I checked changes from transitive dependency bumps as well, AFAICT there is nothing that *should* impact the final rendering.

**tl;dr:** Nothing will explode. Probably.

For completeness, my raw notes of outtakes as I was reviewing the change logs:

```
[cosmetic]
v0.3.2 https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-032
Added automatic dark-theme detection based on the CSS prefers-color-scheme feature. This may be enabled by setting output.html.preferred-dark-theme to your preferred dark theme. #1037
https://github.com/rust-lang/mdBook/pull/1037

v0.3.3 https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-033
Improvements to the automatic dark theme selection. #1069
https://github.com/rust-lang/mdBook/pull/1069

v0.3.7 https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-037
Fixed theme selector focus. #1170
https://github.com/rust-lang/mdBook/pull/1170

* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
* users who picked the dark color scheme in their browser will see the cargo doc in dark.

[cosmetic]
v0.3.2 https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-032
Use standard scrollbar-color CSS along with webkit extension #816
https://github.com/rust-lang/mdBook/pull/816

* https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-color
* scroll bar color might change i guess.

[helpful]
v0.3.2 https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-032
Updated highlight.js for syntax highlighting updates (primarily to add async/await to Rust highlighting). #1041
https://github.com/rust-lang/mdBook/pull/1041

* not sure cargo doc has many code examples with async/await, but there we go.

[warning]
v0.3.2 https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-032
Raised minimum supported rust version to 1.35. #1003
https://github.com/rust-lang/mdBook/pull/1003

* from 1.34.0.

[cosmetic]
v0.3.4 https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-034
Switch to relative rem font sizes from px. #894
https://github.com/rust-lang/mdBook/pull/894

* will impact some displays, but px is already an abstract thing so maybe not that big of an impact.

[warning]
v0.3.5 https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-035
Updated pulldown-cmark to 0.6.1, fixing several issues. #1021
https://github.com/rust-lang/mdBook/pull/1021

* from 0.5, breaking changes.
* parsing only -- the team had to do multiple changes but nothing seems like it would impact final rendering

[cosmetic]
v0.3.6 https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-036
Adjusted spacing of sidebar entries. #1137
https://github.com/rust-lang/mdBook/pull/1137

[warning]
v0.3.6 https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-036
Handlebars updated to 3.0. #1130
https://github.com/rust-lang/mdBook/pull/1130

* from 2.0
* https://github.com/sunng87/handlebars-rust/blob/master/CHANGELOG.md
* strictly maintenance and perf AFAICS, no changes to final rendering.

[cosmetic]
v0.3.6 https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-036
Adjusted the menu bar animation to not immediately obscure the top content. #989
https://github.com/rust-lang/mdBook/pull/989

* personal fave.

[cosmetic]
v0.3.7 https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-037
Code spans in headers are no longer highlighted as code. #1162

* users will see some headers change, probably.

[fixes]
+ ~13 fixes impacting rendering in less immediately visible ways.
rest should have no impact on end-user experience.
```
2020-04-07 19:30:55 +00:00
Thibault Nélis 328c38c643 Fetch mdBook in new location
The mdBook project was moved to the rust-lang organization, out of the
nursery organization.

https://github.com/rust-lang/mdBook/issues/1080
https://github.com/rust-lang/mdBook/pull/1083
https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-034
2020-04-07 12:29:35 -07:00
Thibault Nélis aa71a11122 Index the commands section 2020-04-07 20:18:26 +02:00
Thibault Nélis e0faf21107 Upgrade to mdBook v0.3.7 2020-04-07 20:02:37 +02:00
bors 390e8f245e Auto merge of #8080 - RoccoDev:master, r=alexcrichton
Compatibility for rust-lang/rust#69926

This adds compatibility for the rust-lang/rust#69926 PR, which makes it so a warning count is displayed when the build is done.
2020-04-07 17:46:45 +00:00
bors 2f10a672f6 Auto merge of #8079 - Timmmm:patch-1, r=alexcrichton
Add note about converting triple case in environment variables

This wasn't obvious to me, since `CARGO_TARGET_x86_64-unknown-linux-gnu_LINKER` is a perfectly valid environment variable name. It's especially important to document environment variable names well because if you get it wrong it is just silently ignored.
2020-04-07 17:27:47 +00:00
Rocco 79c8ae8299
Compatibility for rust-lang/rust#69926 2020-04-07 15:23:43 +02:00
Tim 9922973bf4
Add note about converting triple case in environment variables
This wasn't obvious to me, since `CARGO_TARGET_x86_64-unknown-linux-gnu_LINKER` is a perfectly valid environment variable name. It's especially important to document environment variable names well because if you get it wrong it is just silently ignored.
2020-04-07 12:17:55 +01:00
Eric Huss 6e3f35b20a Use the same filename hash for pre-release channels. 2020-04-05 13:46:37 -07:00
Eric Huss c889bbfba8 Add "build-finished" JSON message. 2020-04-04 18:56:50 -07:00
Eric Huss c17bfcbdb2 Implement -Zpackage-features2 2020-04-04 18:04:03 -07:00