Commit graph

13220 commits

Author SHA1 Message Date
bors 3f6c685285 Auto merge of #11477 - kylematsuda:workspace_lockfile, r=weihanglo
Use workspace lockfile when running `cargo package` and `cargo publish`

### What does this PR try to resolve?

Fix #11148.

### How should we test and review this PR?

Please run the integration test in `tests/testsuite/publish_lockfile.rs` or try the steps from the issue.
2022-12-19 18:16:27 +00:00
Kyle Matsuda 8c4f27fd5b make test clearer 2022-12-19 10:50:55 -07:00
bors 6ab160b8f6 Auto merge of #11473 - hi-rustin:rustin-patch-help, r=epage
Show `--help` if there is no man page for subcommand
2022-12-19 14:08:39 +00:00
hi-rustin 53fd815522 Remove update help for config subcommand
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2022-12-19 19:08:35 +08:00
hi-rustin b514b1313c Show --help if there is no man page for subcommand
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2022-12-19 19:08:18 +08:00
bors c994a4a638 Auto merge of #11497 - willcrichton:fix-issue-11496, r=weihanglo
Fix examples of proc-macro crates being scraped for examples

This PR fixes #11496, where examples in proc-macro crates would crash the build with `-Zrustdoc-scrape-examples`. The fix is to change `unit_needs_doc_scrape` to check if a unit is coming from a `proc-macro` package. I added a test to ensure the simple example passes. I also ensured that [automod](https://github.com/dtolnay/automod) also documents correctly.

r? `@weihanglo`
2022-12-18 21:50:58 +00:00
bors 9f4efa5aef Auto merge of #11498 - dtolnay-contrib:relabel, r=ehuss
Enable triagebot's relabel functionality

### What does this PR try to resolve?

This fixes the following failure that rustbot currently posts whenever someone tries to use "<b>`@</b><b>rustbot</b>` label" in this repository.

> **Error**: The feature `relabel` is not enabled in this repository.
> To enable it add its section in the `triagebot.toml` in the root of the repository.

Unauthenticated relabel has been enabled in rust-lang/rust for nearly 4 years. People overwhelmingly use it in good faith.

<br>

### How should we test and review this PR?

Compare against https://github.com/rust-lang/rust/blob/1.66.0/triagebot.toml.

Also skim through the 7 pages of labels on https://github.com/rust-lang/cargo/labels, whether it makes sense the ones I decided to allow arbitrary GitHub users to apply.

<br>

### Additional information

Attempted uses of "<b>`@</b><b>rustbot</b>` label", that failed, but this PR would allow:

- https://github.com/rust-lang/cargo/pull/10343#issuecomment-1200345112
- https://github.com/rust-lang/cargo/pull/10243#issuecomment-1013842215
- https://github.com/rust-lang/cargo/pull/9982#issuecomment-952099226
- https://github.com/rust-lang/cargo/pull/9128#issuecomment-778806343
- https://github.com/rust-lang/cargo/pull/9067#issuecomment-759082349
- https://github.com/rust-lang/cargo/pull/8441#issuecomment-724064074
- https://github.com/rust-lang/cargo/issues/11432#issuecomment-1328715596
- https://github.com/rust-lang/cargo/issues/8841#issuecomment-723649692
- https://github.com/rust-lang/cargo/issues/10820#issuecomment-1176533061
- https://github.com/rust-lang/cargo/issues/10572#issuecomment-1101419326
- https://github.com/rust-lang/cargo/issues/9114#issuecomment-770212444
- https://github.com/rust-lang/cargo/issues/8980#issuecomment-745963184
- https://github.com/rust-lang/cargo/issues/9064#issuecomment-758120957
- https://github.com/rust-lang/cargo/issues/8726#issuecomment-697074328
- https://github.com/rust-lang/cargo/issues/8089#issuecomment-611213914
2022-12-18 20:21:01 +00:00
David Tolnay a41b599e60
Enable triagebot's relabel functionality 2022-12-18 11:27:00 -08:00
Will Crichton d588298c3f Fix examples of proc-macro crates being scraped for examples 2022-12-18 10:41:21 -08:00
bors e517d5a839 Auto merge of #11495 - weihanglo:revert-11419, r=ehuss
Revert "temporarily disable test `lto::test_profile`"

This reverts commit d5cac16d07. The broken change in rustc has been reverted.
2022-12-18 00:15:42 +00:00
Weihang Lo 0523f42cc2
Revert "temporarily disable test lto::test_profile"
This reverts commit d5cac16d07.
2022-12-17 22:51:57 +00:00
bors c7fb75640a Auto merge of #11493 - weihanglo:version-bump, r=epage
Bump to 0.69.0, update changelog
2022-12-17 02:26:45 +00:00
Weihang Lo 9520d703ec
Update changelog for 1.68 2022-12-17 02:02:32 +00:00
Weihang Lo cab4ae0d44
Update changelog for 1.67 2022-12-17 02:02:18 +00:00
Weihang Lo 65827de784
Bump to 0.69.0 2022-12-17 00:21:01 +00:00
bors 47860645b4 Auto merge of #11491 - julien-me:julien-fix-typo, r=epage
Fix typo

#### What does this PR try to resolve?

Simple typo in the comments.
2022-12-16 21:40:09 +00:00
Julien Merzoug Cosnuau 4db4a13662 Fix typo 2022-12-16 22:02:41 +01:00
bors 4534dd67bf Auto merge of #11488 - ehuss:ci-dump-cpu, r=weihanglo
Display CPU info in CI

This displays the CPU information on the CI runners in the logs. This can be helpful for diagnosing CI issues and to better understand the environment they are running under.
2022-12-16 15:51:36 +00:00
bors ead8cbd11d Auto merge of #11489 - ehuss:collision-test, r=epage
Fix collision_doc_profile test error

This fixes the `collision_doc_profile` test which was sporadically failing on CI. My theory is that the first `common` build finishes quickly (or the other job slot is delayed). The proc-macro `pm` starts (likely very quickly due to pipelining), and it can jump ahead before the second `common` build starts (or at least before the `Message::Run` message gets delivered).

The order isn't really important or relevant to this test (all that matters is that "common" shows up twice), so this ignores the order of the messages.

cc #11334
2022-12-16 14:44:04 +00:00
Eric Huss b1bcc9c834 Fix collision_doc_profile test error 2022-12-15 20:04:50 -08:00
Eric Huss a371b1a6f4 Display CPU info in CI 2022-12-15 19:35:24 -08:00
bors 8607003bc2 Auto merge of #11399 - Muscraft:autofix-for-clippy, r=weihanglo
fix: Make auto-fix note work with `clippy`

[Someone pointed out](https://github.com/rust-lang/cargo/issues/10976#issuecomment-1307538134) that the suggestion to run `cargo --fix` did not work properly for `cargo clippy`. This makes sure the correct command to run is output when running under `cargo clippy`.

This is done by checking if the `RUSTC_WORKSPACE_WRAPPER` environment variable is set, since `clippy` [sets this every run](51ec465cc3/src/main.rs (L140)). Since other things can use `RUSTC_WORKSPACE_WRAPPER`, we look for a wrapper named [`clippy-driver`](51ec465cc3/src/main.rs (L120)).

Since `clippy` might not be available everywhere `cargo` is tested, this is tested using a `rustc` wrapper.
2022-12-15 17:05:54 +00:00
Scott Schafer 33c32088fa fix: Make auto-fix note work with clippy 2022-12-15 10:54:35 -06:00
bors a56fedcea4 Auto merge of #11483 - philpax:patch-1, r=weihanglo
fix(add): use the possessive in error message

### What does this PR try to resolve?

While using `cargo add` to add some dependencies with features, I noticed this error message didn't use an apostrophe. A really minor issue, but it bugged me 😅
2022-12-15 11:21:15 +00:00
Philpax 249683b456
fix(tests): update to match add change 2022-12-15 09:34:23 +01:00
Philpax 365ca5d28c
fix(add): use the possessive in error message 2022-12-15 19:09:25 +11:00
bors f8d488ac68 Auto merge of #11481 - ehuss:contrib-home-docs, r=weihanglo
Document home crate in contrib docs

This adds some context around the `home` crate that was recently added.
2022-12-15 07:07:44 +00:00
bors a26de9ef45 Auto merge of #11480 - arlosi:registrydocs, r=ehuss
Split up registry documentation into multiple sections

Splits up the documentation for registries into multiple sections. Avoids making any changes to the docs themselves beyond adding links.

The upcoming stabilization of the sparse registry protocol will include more content changes to these docs.

Closes #11476
r? `@ehuss`
2022-12-15 03:35:35 +00:00
Eric Huss 39737e245f Document home crate in contrib docs 2022-12-14 19:31:49 -08:00
Arlo Siemsen 9231df2538
Add redirects for registry links
Co-authored-by: Eric Huss <eric@huss.org>
2022-12-14 21:27:51 -06:00
Arlo Siemsen a71b17df50 Split up registry documentation into multiple sections 2022-12-14 17:37:36 -06:00
bors cc0a320879 Auto merge of #11434 - weihanglo:issue/10526, r=ehuss
artifact deps should works when target field specified coexists with `optional = true`
2022-12-14 14:46:57 +00:00
bors 06178d7a7c Auto merge of #11359 - LucioFranco:lucio/home-crate, r=ehuss
Add `home` crate to cargo crates

### What does this PR try to resolve?

The `home` crate is the crate used by both `rustup` and `cargo` to define their home directories. The crate is quite small but plays an important role in gluing rust tooling together. This PR adds this crate the `crates` folder within cargo to allow the cargo team and the rust project to maintain this small crate.

### Additional information

I've also added both `rust-lang-owners` and `ehuss` as owners of the crate. Once, merged I will archive the old repo.

Reference zulip conversation: https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Moving.20the.20home.20crate.20into.20rust-lang.20and.20under.20cargo/near/299975263

cc `@weihanglo` `@ehuss`
2022-12-14 13:45:55 +00:00
Lucio Franco 18a06cc809 fix ci to test local home crate 2022-12-13 15:40:26 -05:00
Weihang Lo eca3e23d6d
Explain why we don't need to pass dep.artifact() 2022-12-13 20:25:02 +00:00
bors 777960615a Auto merge of #11475 - Chocobo1:gitUrl, r=weihanglo
Use proper git URL for GitHub repos

It can be seen in the following link that a git repo URL from GitHub should end with ".git": https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#about-remote-repositories
2022-12-13 08:59:34 +00:00
Kyle Matsuda 4d86b26a68 fix test 2022-12-12 15:47:31 -07:00
Lucio Franco faa9b31dff Remove home crate path dep 2022-12-12 14:02:07 -05:00
Lucio Franco ac9da4b193 home: Remove github ci, link license, remove others 2022-12-12 13:52:23 -05:00
Lucio Franco 98a3d4e385 Add home crate to CI 2022-12-12 13:49:46 -05:00
Lucio Franco 6a1a9edd40 Merge branch 'homemerge' into lucio/home-crate 2022-12-12 13:46:59 -05:00
Lucio Franco dbb8dada19 Add crate 2022-12-12 13:46:41 -05:00
Kyle Matsuda 70dc9c0ea4 replace call to resolve_ws with resolve_with_previous 2022-12-12 11:19:23 -07:00
Kyle Matsuda 4cda74a1a3 add test with current behavior 2022-12-12 11:07:43 -07:00
bors 0409e398bb Auto merge of #11474 - psumbera:master, r=ehuss
Fixes flock(fd, LOCK_UN) emulation on Solaris.

Follow up fix for #11421.
2022-12-12 13:04:02 +00:00
Chocobo1 ce174d4efc
Use proper git URL for GitHub repos
It can be seen in the following link that a git repo URL from GitHub should end with ".git":
https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#about-remote-repositories
2022-12-12 17:56:49 +08:00
Petr Sumbera f28b77c4ad Fixes flock(fd, LOCK_UN) emulation on Solaris.
Follow up fix for #11421.
2022-12-12 08:03:07 +01:00
bors 4a8d17e236 Auto merge of #11450 - willcrichton:example-analyzer, r=weihanglo
Allow Check targets needed for optional doc-scraping to fail without killing the build

### What does this PR try to resolve?

In doing a Crater run of -Zrustdoc-scrape-examples, I found that the only remaining regressions are cases where:
* A library does not type-check
* The library has examples
* Cargo tries to scrape the examples, which requires checking the library
* The Check unit for the library fails, crashing the build

The core issue is that the Check unit should be able to fail without killing the build. This PR fixes this issue by checking for this condition, and then allowing the unit to fail.

Specifically, I added a new method `BuildContext::unit_can_fail_for_docscraping` that determines the conditions for whether a unit is allowed to fail. This method is used both in `JobQueue` to interpret process failure, and in the `rustc`/`rustdoc` functions to emit a warning upon failure. I modified `rustc` to handle the case of failure similar to `rustdoc`, but with a slightly different diagnostic.

### How should we test and review this PR?

The unit test `no_fail_bad_lib` has been extended with example files to test this case.

r? `@weihanglo`
2022-12-11 22:27:21 +00:00
bors 9c8e8a9abb Auto merge of #11323 - weihanglo:issue/11310, r=ehuss
fix: gleaning rustdocflags from `target.cfg(…)` is not supported

### What does this PR try to resolve?

Fixes #11310

The bug was `rustflags_from_target` trying to learn rustdocflags from
`target.cfg(…).rustflags`, which is definitely wrong.

As of this writing, either `target.cfg(…).rustdocflags` or
`target.<triple>.rustdocflags` is not supported.

### How should we test and review this PR?

See f8d1b30ad3 as an example.
<!-- homu-ignore:end -->
2022-12-11 16:52:06 +00:00
bors f3905fa5b3 Auto merge of #11470 - DominicBurkart:patch-1, r=ehuss
Fix typo

### What does this PR try to resolve?

one-word typo in docs, no associated issue
2022-12-11 13:36:19 +00:00