Commit graph

13209 commits

Author SHA1 Message Date
David Tolnay a41b599e60
Enable triagebot's relabel functionality 2022-12-18 11:27:00 -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
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
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
Dominic Burkart 709ecf5eae
fix typo 2022-12-11 11:51:45 +01:00
bors c6c69cde0d Auto merge of #11469 - nilclass:patch-1, r=weihanglo
resolver.md: Fix naming in example

### What does this PR try to resolve?

It fixes what I believe to be a typo in the documentation.

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

Adding the example as it was to a `Cargo.toml` prints this warning:
```
warning: unused manifest key: dependency
```

With the corrected version it does not.
2022-12-10 11:02:26 +00:00
Niklas Cathor 439fde9bec
resolver version 2: Fix naming in example 2022-12-10 11:16:42 +01:00
Will Crichton 29407d0631 Only compute failed_scrape_diagnostic when needed 2022-12-09 10:37:47 -08:00
bors 70898e5221 Auto merge of #11458 - weihanglo:doc/unit-generator, r=epage
Rename `generate_units` -> `generate_root_units`
2022-12-05 19:43:44 +00:00
Weihang Lo 6683e39621
doc(cargo_compile): generate_units -> generate_root_units 2022-12-05 19:19:07 +00:00
Weihang Lo 5b8985a470
fix(bindeps): assumed host target and optional = true coexist
`{ …, artifact = "bin", target = "target" }` should also be considered
to being built for `FeaturesFor::ArtifactDep` instead of `NormalOrDev`.

[This line][1] requests for `ArtifactDep` but [here][2] Cargo ignore
assumed host target of artifact dep.

Change it to explicit set host target triple when

- `{ …, target = "target" }`, and
- `--target` is not presented, meaning it would be build on host platform.

[1]: 1382b44e43/src/cargo/core/compiler/unit_dependencies.rs (L887)
[2]: 1382b44e43/src/cargo/core/resolver/features.rs (L857)
2022-12-04 11:43:50 +00:00
Weihang Lo bf56587e26
fix(bindeps): target field specified and optional = true coexist
> Adapted from #11183

Previously, `is_dep_activated` depends on `activated_dependencies`,
which is a map of `PackageFeaturesKey` to its own activated `DepFeature`s.
`PackageFeaturesKey` in feature resolver is always comprised of

* A `PackageId` of a given dependency, and
* A enum value that helps decoupling activated features for that dependency.
  Currently depending on the type of given dependency.

Looking into issue 10526, it has an `activated_dependencies` of

```
{
    (mycrate, NormalOrDev) -> [dep:mybindep]
}
```

However, this [line][1] accidentally use a parent's `pkgid`
and a dependency's `FeaturesFor` to compose a key:

```
(mycrate, ArtifactDep("x86_64-unknown-linux-gnu"))
```

That is never a valid key to query features for artifacts dependency.
A valid key should be comprised of components both from the parent:

```
(mycrate, NormalOrDev)
```

Or both from the dependency itself:

```
(mybindep, ArtifactDep("x86_64-unknown-linux-gnu"))
```

This `unit_for` is from parent and should already contain its own
artifact dep information inside `artifact_target_for_features`,
so we don't need to map any dependency artifact from `dep.artifact()`.

[1]: a2ea66bea6/src/cargo/core/compiler/unit_dependencies.rs (L1106-L1107)
2022-12-04 11:41:49 +00:00
Weihang Lo 7dcb6daa7d
test(bindeps): assumed host target and optional = true coexist 2022-12-04 11:41:49 +00:00
Weihang Lo 437bed069a
test(bindeps): target field specified and optional = true coexist 2022-12-04 11:41:49 +00:00
bors 7bdb96929d Auto merge of #11439 - psumbera:master, r=ehuss
Implements cargo file locking using fcntl on Solaris.

Fixes #11421.
2022-12-03 20:41:32 +00:00