16085 Commits

Author SHA1 Message Date
bors
dd5e47acd2 Auto merge of #13085 - ehuss:registry-support-more, r=epage
Add more options to registry test support.

This adds a few things that are missing in the registry test support code. These aren't immediately necessary, since no tests rely on them. However, I wrote it for something else that I ended up not needing, but I think it is still helpful for future work.

The additions are:

- Ability to specify `default-features=false` for a registry dependency.
- Include binary dependencies in the index for the `cargo publish` HTTTP server (current `cargo publish` tests use `file:///` upload, and don't verify the index).
- Include `rust-version` in the `cargo publish` HTTP server (current `cargo publish` tests don't verify the index).
- Include the `features=[…]` field for dependencies in the published `Cargo.toml` (cargo doesn't read features from `Cargo.toml`, it only uses the registry, but it is probably best to keep it in sync).
- Include the `package="…"` field for dependencies (for renamed dependencies) in the published `Cargo.toml` (similarly, cargo only uses the index, but it is probably good to keep in sync).
2023-12-01 01:24:10 +00:00
Eric Huss
1aa769240d Add more options to registry test support. 2023-11-30 16:39:08 -08:00
bors
1ef8575839 Auto merge of #13077 - GuillaumeGomez:filter-workspace-scrape-example, r=epage
Don't filter on workspace members when scraping doc examples

Fixes https://github.com/rust-lang/cargo/issues/13074.

I confirmed locally that it fixed the issue in docs.rs.

cc `@willcrichton`
r? `@epage`
2023-11-30 16:42:35 +00:00
Guillaume Gomez
689d9a7e4f Don't filter on workspace members when scraping doc examples 2023-11-30 17:38:49 +01:00
Guillaume Gomez
95a27cdbd1 Add regression test for scraped examples in crates without [workspace] 2023-11-30 17:36:46 +01:00
bors
7ed235a48e Auto merge of #13076 - hi-rustin:rustin-patch-add, r=epage
Remove the outdated comment
2023-11-30 03:11:37 +00:00
hi-rustin
fc45ed29d7 Remove the outdated comment
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-11-30 10:57:23 +08:00
bors
f38ebbe9d4 Auto merge of #13036 - epage:defenestrate, r=Eh2406
fix(resolver): Remove unused public-deps error handling

To implement rust-lang/rfcs#3516, we need to decouple the resolver's behavior from the unstable flag.  Since the code path is now dead, I went ahead and removed it.
2023-11-29 21:50:33 +00:00
Ed Page
a43e09073c test(resolver): Don't bother generating public cases 2023-11-29 13:11:39 -06:00
bors
430effa37d Auto merge of #12484 - adrianEffe:fix/error-count, r=weihanglo
Fixes error count display is different when there's only one error left

### What does this PR try to resolve?

When there's only 1 error left, the number 1 appears in the output so that it scans the same as the output when there's more than 1 error, so:

```
error: could not compile `crate` (lib test) due to 1 previous error
```
instead of the current:
```
error: could not compile `crate` (lib test) due to a previous error
```

Fixes #12390

rustc related PR [#114759](https://github.com/rust-lang/rust/pull/114759)
2023-11-29 19:07:16 +00:00
bors
07f1208a9f Auto merge of #13065 - weihanglo:remap-path-prefix-order, r=ehuss
fix: reorder `--remap-path-prefix` flags for `-Zbuild-std`

### What does this PR try to resolve?

Order of `--remap-path-prefix` flags is important for `-Zbuild-std`.
We want to show `/rustc/<hash>/library/std` instead of `std-0.0.0`.

Fixes rust-lang/rust#117839

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

Follow the steps in rust-lang/rust#117839, or run

```
CARGO_RUN_BUILD_STD_TESTS=true cargo +nightly t --test build-std
```

to verify.
2023-11-29 18:28:07 +00:00
Ed Page
e6da166c8b test(resolver-tests): Remove public dep support from SAT resolver 2023-11-29 12:17:26 -06:00
Adrian
3e297a6803
Update test for override respects spec metadata 2023-11-29 18:47:27 +02:00
Adrian
b7b5a093a1
Fix cargo errors counter 2023-11-29 18:47:14 +02:00
bors
d5d9c35e5f Auto merge of #13072 - belovdv:jobserver-remove-env-var, r=weihanglo
remove jobserver env var in some tests

This PR makes cargo compatible with [rust-lang/rust#113730](https://github.com/rust-lang/rust/pull/113730). Linked [comment](https://github.com/rust-lang/rust/pull/113730#issuecomment-1821892786). Problem to be fixed: shim for cargo fix spawns rustc with make environment variable inherited, which points to closed jobserver.

r? `@weihanglo`
2023-11-29 12:57:11 +00:00
belovdv
6b86f93713 remove jobserver in shim for tests in testsuite/fix 2023-11-29 15:30:58 +03:00
bors
bec67ed6d2 Auto merge of #13069 - weihanglo:buildscript-cfg, r=ehuss
doc: clarify different target has different set of `CARGO_CFG_*` values
2023-11-29 03:49:59 +00:00
Weihang Lo
8e7dbebcfd
doc: clarify different target has different set of CARGO_CFG_* values 2023-11-28 22:47:18 -05:00
bors
35ea623b4c Auto merge of #13070 - weihanglo:pr-template, r=epage
docs: remove review capacity notice in PR template

Forgot to update PR template in #12842. This updates accordingly.

Note that this doesn't mean Cargo start accepting arbitrary pull requests or features. The reviewers are still a small handful of people. The guideline never changes — issue, discuss, then pull request.
2023-11-29 02:00:53 +00:00
Weihang Lo
44e063830c
docs: remove review capacity notice 2023-11-28 20:40:27 -05:00
bors
99f6ac64ef Auto merge of #13068 - rust-lang:renovate/crate-openssl-vulnerability, r=weihanglo
chore(deps): update rust crate openssl to 0.10.60 [security]

[![Mend Renovate logo banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [openssl](https://togithub.com/sfackler/rust-openssl) | workspace.dependencies | patch | `0.10.57` -> `0.10.60` |

### GitHub Vulnerability Alerts

#### [GHSA-xphf-cx8h-7q9g](https://togithub.com/sfackler/rust-openssl/issues/2096)

This function returned a reference into an OpenSSL datastructure, but there was no way to ensure OpenSSL would not mutate the datastructure behind one's back.

Use of this function should be replaced with `X509StoreRef::all_certificates`.

---

### Release Notes

<details>
<summary>sfackler/rust-openssl (openssl)</summary>

### [`v0.10.60`](https://togithub.com/sfackler/rust-openssl/releases/tag/openssl-v0.10.60)

[Compare Source](https://togithub.com/sfackler/rust-openssl/compare/openssl-v0.10.59...openssl-v0.10.60)

#### What's Changed

-   Correct off-by-one in minimum output buffer size computation by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2088](https://togithub.com/sfackler/rust-openssl/pull/2088)
-   Expose a few more (bad) ciphers in cipher::Cipher by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2084](https://togithub.com/sfackler/rust-openssl/pull/2084)
-   add temp key bindings by [`@&#8203;jmayclin](https://togithub.com/jmayclin)` in [https://github.com/sfackler/rust-openssl/pull/2076](https://togithub.com/sfackler/rust-openssl/pull/2076)
-   Expose ChaCha20 on LibreSSL by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2093](https://togithub.com/sfackler/rust-openssl/pull/2093)
-   Revert "Correct off-by-one in minimum output buffer size computation" by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2090](https://togithub.com/sfackler/rust-openssl/pull/2090)
-   Added `update_unchecked` to `symm::Crypter` by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2100](https://togithub.com/sfackler/rust-openssl/pull/2100)
-   fixes [#&#8203;2096](https://togithub.com/sfackler/rust-openssl/issues/2096) -- deprecate `X509StoreRef::objects`, it is unsound by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2099](https://togithub.com/sfackler/rust-openssl/pull/2099)
-   Don't leak when overwriting ex data by [`@&#8203;sfackler](https://togithub.com/sfackler)` in [https://github.com/sfackler/rust-openssl/pull/2102](https://togithub.com/sfackler/rust-openssl/pull/2102)
-   Release openssl v0.10.60 and openssl-sys v0.9.96 by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2104](https://togithub.com/sfackler/rust-openssl/pull/2104)

**Full Changelog**: https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.59...openssl-v0.10.60

### [`v0.10.59`](https://togithub.com/sfackler/rust-openssl/releases/tag/openssl-v0.10.59)

[Compare Source](https://togithub.com/sfackler/rust-openssl/compare/openssl-v0.10.58...openssl-v0.10.59)

#### What's Changed

-   Add binding to NID of Chacha20-Poly1305 cipher by [`@&#8203;Arnavion](https://togithub.com/Arnavion)` in [https://github.com/sfackler/rust-openssl/pull/2081](https://togithub.com/sfackler/rust-openssl/pull/2081)
-   Fixed cfg for RSA_PSS by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2079](https://togithub.com/sfackler/rust-openssl/pull/2079)
-   fixes [#&#8203;2050](https://togithub.com/sfackler/rust-openssl/issues/2050) -- build and test on libressl 3.8.2 by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2082](https://togithub.com/sfackler/rust-openssl/pull/2082)
-   Release openssl v0.10.59 and openssl-sys v0.9.95 by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2083](https://togithub.com/sfackler/rust-openssl/pull/2083)

#### New Contributors

-   [`@&#8203;Arnavion](https://togithub.com/Arnavion)` made their first contribution in [https://github.com/sfackler/rust-openssl/pull/2081](https://togithub.com/sfackler/rust-openssl/pull/2081)

**Full Changelog**: https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.58...openssl-v0.10.59

### [`v0.10.58`](https://togithub.com/sfackler/rust-openssl/releases/tag/openssl-v0.10.58)

[Compare Source](https://togithub.com/sfackler/rust-openssl/compare/openssl-v0.10.57...openssl-v0.10.58)

#### What's Changed

-   LibreSSL 3.8.1 support by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2035](https://togithub.com/sfackler/rust-openssl/pull/2035)
-   Update vendored version to openssl 3 by [`@&#8203;amousset](https://togithub.com/amousset)` in [https://github.com/sfackler/rust-openssl/pull/1925](https://togithub.com/sfackler/rust-openssl/pull/1925)
-   Test against 3.2.0-alpha1 by [`@&#8203;sfackler](https://togithub.com/sfackler)` in [https://github.com/sfackler/rust-openssl/pull/2037](https://togithub.com/sfackler/rust-openssl/pull/2037)
-   Removed reference to non-existent method by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2039](https://togithub.com/sfackler/rust-openssl/pull/2039)
-   Bump CI to 1.1.1w by [`@&#8203;sfackler](https://togithub.com/sfackler)` in [https://github.com/sfackler/rust-openssl/pull/2040](https://togithub.com/sfackler/rust-openssl/pull/2040)
-   \[openssl-sys] Add X509\_check\_{host,email,ip,ip_asc} fns by [`@&#8203;jgallagher](https://togithub.com/jgallagher)` in [https://github.com/sfackler/rust-openssl/pull/2042](https://togithub.com/sfackler/rust-openssl/pull/2042)
-   Expose CBC mode for several more (bad) ciphers by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2045](https://togithub.com/sfackler/rust-openssl/pull/2045)
-   Expose two additional Pkey IDs by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2046](https://togithub.com/sfackler/rust-openssl/pull/2046)
-   Add support for CRL extensions and the Authority Information Access e… by [`@&#8203;AdmiralGT](https://togithub.com/AdmiralGT)` in [https://github.com/sfackler/rust-openssl/pull/2003](https://togithub.com/sfackler/rust-openssl/pull/2003)
-   Fix clippy warnings produced by newer Rust by [`@&#8203;wiktor-k](https://togithub.com/wiktor-k)` in [https://github.com/sfackler/rust-openssl/pull/2052](https://togithub.com/sfackler/rust-openssl/pull/2052)
-   Use osslconf on BoringSSL by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2056](https://togithub.com/sfackler/rust-openssl/pull/2056)
-   Make X509\_ALGOR opaque for LibreSSL by [`@&#8203;botovq](https://togithub.com/botovq)` in [https://github.com/sfackler/rust-openssl/pull/2060](https://togithub.com/sfackler/rust-openssl/pull/2060)
-   Don't ignore ECDSA tests without GF2m support by [`@&#8203;botovq](https://togithub.com/botovq)` in [https://github.com/sfackler/rust-openssl/pull/2061](https://togithub.com/sfackler/rust-openssl/pull/2061)
-   Clarify 'possible LibreSSL bug' by [`@&#8203;botovq](https://togithub.com/botovq)` in [https://github.com/sfackler/rust-openssl/pull/2062](https://togithub.com/sfackler/rust-openssl/pull/2062)
-   Enable BN_mod_sqrt() for upcoming LibreSSL 3.8.2 by [`@&#8203;botovq](https://togithub.com/botovq)` in [https://github.com/sfackler/rust-openssl/pull/2063](https://togithub.com/sfackler/rust-openssl/pull/2063)
-   Enable SHA-3 for LibreSSL 3.8.0 by [`@&#8203;botovq](https://togithub.com/botovq)` in [https://github.com/sfackler/rust-openssl/pull/2064](https://togithub.com/sfackler/rust-openssl/pull/2064)
-   Remove DH_generate_parameters for LibreSSL 3.8.2 by [`@&#8203;botovq](https://togithub.com/botovq)` in [https://github.com/sfackler/rust-openssl/pull/2065](https://togithub.com/sfackler/rust-openssl/pull/2065)
-   Use EVP_MD_CTX\_{new,free}() in LibreSSL 3.8.2 by [`@&#8203;botovq](https://togithub.com/botovq)` in [https://github.com/sfackler/rust-openssl/pull/2067](https://togithub.com/sfackler/rust-openssl/pull/2067)
-   Enable HKDF support for LibreSSL >= 3.6.0 by [`@&#8203;botovq](https://togithub.com/botovq)` in [https://github.com/sfackler/rust-openssl/pull/2066](https://togithub.com/sfackler/rust-openssl/pull/2066)
-   Two build script fixes for LibreSSL by [`@&#8203;botovq](https://togithub.com/botovq)` in [https://github.com/sfackler/rust-openssl/pull/2068](https://togithub.com/sfackler/rust-openssl/pull/2068)
-   Respect OPENSSL_NO_OCB on AES functions by [`@&#8203;GuyLewin](https://togithub.com/GuyLewin)` in [https://github.com/sfackler/rust-openssl/pull/2070](https://togithub.com/sfackler/rust-openssl/pull/2070)
-   Support OPENSSL_NO_SCRYPT by [`@&#8203;GuyLewin](https://togithub.com/GuyLewin)` in [https://github.com/sfackler/rust-openssl/pull/2071](https://togithub.com/sfackler/rust-openssl/pull/2071)
-   Bump 3.2.0 beta by [`@&#8203;sfackler](https://togithub.com/sfackler)` in [https://github.com/sfackler/rust-openssl/pull/2073](https://togithub.com/sfackler/rust-openssl/pull/2073)
-   add security level bindings by [`@&#8203;jmayclin](https://togithub.com/jmayclin)` in [https://github.com/sfackler/rust-openssl/pull/2074](https://togithub.com/sfackler/rust-openssl/pull/2074)
-   Release openssl v0.10.58 and openssl-sys v0.9.94 by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2078](https://togithub.com/sfackler/rust-openssl/pull/2078)

#### New Contributors

-   [`@&#8203;amousset](https://togithub.com/amousset)` made their first contribution in [https://github.com/sfackler/rust-openssl/pull/1925](https://togithub.com/sfackler/rust-openssl/pull/1925)
-   [`@&#8203;jgallagher](https://togithub.com/jgallagher)` made their first contribution in [https://github.com/sfackler/rust-openssl/pull/2042](https://togithub.com/sfackler/rust-openssl/pull/2042)
-   [`@&#8203;AdmiralGT](https://togithub.com/AdmiralGT)` made their first contribution in [https://github.com/sfackler/rust-openssl/pull/2003](https://togithub.com/sfackler/rust-openssl/pull/2003)
-   [`@&#8203;botovq](https://togithub.com/botovq)` made their first contribution in [https://github.com/sfackler/rust-openssl/pull/2060](https://togithub.com/sfackler/rust-openssl/pull/2060)
-   [`@&#8203;GuyLewin](https://togithub.com/GuyLewin)` made their first contribution in [https://github.com/sfackler/rust-openssl/pull/2070](https://togithub.com/sfackler/rust-openssl/pull/2070)
-   [`@&#8203;jmayclin](https://togithub.com/jmayclin)` made their first contribution in [https://github.com/sfackler/rust-openssl/pull/2074](https://togithub.com/sfackler/rust-openssl/pull/2074)

**Full Changelog**: https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.57...openssl-v0.10.58

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/rust-lang/cargo).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9-->
2023-11-28 22:14:19 +00:00
renovate[bot]
0998ad3090
chore(deps): update rust crate openssl to 0.10.60 [security] 2023-11-28 21:44:54 +00:00
bors
5dfe9bf5d7 Auto merge of #13066 - epage:msrv, r=Eh2406
fix(resolver): De-prioritize no-rust-version in MSRV resolver

### What does this PR try to resolve?

This is a corner case without a good answer.
As such, this change leans on some happy-path entries existing and
preferring those.

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

### Additional information

This was originally discussed around the time of #12950 but was held off.

When working on this, I was considering other heuristics like
- If a future version has an MSRV, assume that it applies also to the current version
  - This can be added in the future
  - We likely would want to consider an alternative value, like inferring the rust-version from the manifest or the rust-version used from publish
- Sort no-MSRV versions of a package by minimal versions
  - The lower the version, the more likely it is to be compatible
  - This likely could apply to incompatible MSRVs (or we could reverse-sort those by rust-version) but those will error anyways without `--ignore-rust-version`, so I decided against these
  - I realized this was a backdoor to minimal versions for dependencies without a MSRV and that the community support isn't there for that yet to be a high enough quality of an experience
2023-11-28 21:01:32 +00:00
Weihang Lo
8709835a01
fix: reorder --remap-path-prefix flags for -Zbuild-std
Order of `--remap-path-prefix` flags is important for `-Zbuild-std`.
We want to show `/rustc/<hash>/library/std` instead of `std-0.0.0`.
2023-11-28 15:29:03 -05:00
Ed Page
1b97a5c5c0 fix(resolver): De-prioritize no-rust-version in MSRV resolver
This is a corner case without a good answer.
As such, this change leans on some happy-path entries existing and
preferring those.
2023-11-28 14:14:03 -06:00
bors
26333c7320 Auto merge of #13057 - AlexTMjugador:docs/workspace-lints-crossreference, r=epage
docs: link to the packages lint table from the related workspace table

### What does this PR try to resolve?

This PR makes the exact format and definition of the workspace `lints` table easier to discover. It also follows the style of the surrounding documentation, such as the section immediately before about the `dependencies` table, which cross-references related package table documentation.

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

N/A

### Additional information

N/A
2023-11-28 20:07:39 +00:00
Weihang Lo
d6b46bfd37
test(trim-paths): demonstrate not work properly with -Zbuild-std 2023-11-28 15:07:10 -05:00
Ed Page
defe789dfa test(resolver): Add more MSRV test cases 2023-11-28 13:57:51 -06:00
bors
15a35e56b0 Auto merge of #13055 - ehuss:document-more-gc-fields, r=epage
Add more doc comments for gc changes.

I missed adding these in https://github.com/rust-lang/cargo/pull/12634.
2023-11-28 19:28:30 +00:00
bors
b4c2befee5 Auto merge of #13056 - epage:msrv, r=weihanglo
docs: Provide pointers for MSRV

### What does this PR try to resolve?

In today's cargo team meeting, we discussed the Pre-RFC for MSRV-aware resolver for #9930.
In that discussion, the question of recommending a policy came up. While we didn't feel the ecosystem has coalesced enough to set one (and we hope MSRV-aware resolver will avoid the need),
it became clear that some we can provide some basic help to the user, including
- Raising awareness of tools to find the actual MSRV
- The policy that they should verify it with examples on how to do so

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

While this recommends some specific third-party tools, I'm not aware of other tools within this for us to worry about at this time for us to create any guidelines on which we should include.

Explanations are given for the example CI job to discourage cargo culting and instead give people the information they need in making decisions relevant to their project.

### Additional information

I'd love to provide information to help users create their own MSRV policy but only if there was an automated way of collecting and reporting some of the data, like crates.io providing a dashboard of MSRVs set or rust-versions inferred from user-agents.

Without that, I felt it not worth getting into other policy discussions like reactive vs proactive updating of MSRV, automated MSRV updates, etc.  These can always be added later.

This also helps towards #5656.
2023-11-28 18:56:50 +00:00
Alejandro González
cc4f6515a8
docs: link to the packages lint table from the related workspace table
This makes the exact format and definition of the workspace `lints`
table easier to discover. It also follows the style of the surrounding
documentation, such as the section immediately before about the
`dependencies` table, which cross-references related package table
documentation.
2023-11-28 19:42:20 +01:00
Ed Page
a0c4a4c971 docs: Provide pointers for MSRV
In today's cargo team meeting, we discussed the Pre-RFC for MSRV-aware
resolver.
In that discussion, the question of recommending a policy came up.
While we didn't feel the ecosystem has coalesced enough to set one (and
we hope MSRV-aware resolver will avoid the need),
it became clear that some we can provide some basic help to the user,
including
- Raising awareness of tools to find the actual MSRV
- The policy that they should verify it with examples on how to do so

While this recommends some specific third-party tools,
I'm not aware of other tools within this for us to worry about at this
time for us to create any guidelines on which we should include.
2023-11-28 11:42:45 -06:00
Eric Huss
6950059900 Add more doc comments for gc changes.
I missed adding these in https://github.com/rust-lang/cargo/pull/12634.
2023-11-28 08:46:30 -08:00
bors
2d1c64bbc7 Auto merge of #13054 - YoshiLeLama:patch-1, r=ehuss
Fixed typo in SemVer Compatibility documentation page

fixed typo : it was written 'non_exhastive' instead of 'non_exhaustive'.
2023-11-28 14:20:43 +00:00
Antoine Roumilhac
a38c9393d1
Update semver.md: fixed typo
fixed typo : was written 'non_exhastive' instead of 'non_exhaustive'
2023-11-28 15:12:32 +01:00
bors
30efe860c0 Auto merge of #13050 - weihanglo:rustfix-error, r=epage
refactor: use custom error instead of anyhow
2023-11-27 16:31:40 +00:00
Weihang Lo
21274da65b
chore: bump rustfix to 0.7.0 2023-11-27 10:50:10 -05:00
Weihang Lo
ed347ce4dc
refactor: use custom error instead of anyhow 2023-11-27 10:50:10 -05:00
bors
3920bd5ea5 Auto merge of #13047 - tompscanlan:rustfix-ignored-tests, r=weihanglo
review and remove ignored tests in rustfix

### What does this PR try to resolve?
review ignored tests in rustfix crate per #13034.

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

### Additional information

* Removed unproductive test in `parse_and_replace`
* un-ignore proptests, and reduce runtime from ~2s to ~<.25s
2023-11-26 17:14:11 +00:00
Tom Scanlan
b179cd175a
review and remove ignored tests in rustfix
* reduce time in proptest
* delete edition dir
* remove refs to fixmode::EDITION
2023-11-26 09:29:18 -05:00
bors
35ed69cb1b Auto merge of #13048 - weihanglo:rustfix-doc, r=epage
docs: add doc comments for rustfix
2023-11-25 23:45:45 +00:00
Weihang Lo
358b7ae76d
docs(rustfix): add more doc comments 2023-11-25 17:48:21 -05:00
Weihang Lo
27b7c6c203
docs(rustfix): comments for diagnostic JSON output
Most doc comments are copied from rust-lang/rust repo.

The doc for each item is hand-written as there is no comment in the
original place.
2023-11-25 13:09:39 -05:00
bors
9b13310ca5 Auto merge of #12996 - epage:current_dir, r=weihanglo
feat: Add `CARGO_RUSTC_CURRENT_DIR` (unstable)

### What does this PR try to resolve?

This is an alternative to #12158's `CARGO_WORKSPACE_DIR` that was
implementing the solution to #3946 that previously discussed in the
cargo team meeting.

`CARGO_WORKSPACE_DIR` is a bit awkward to document / describe because
its the effective workspace directory of the thing being built.
If the thing being built doesn't have a workspace, it falls back to
`CARGO_MANIFEST_DIR`.

It would also be hard to take into account what the
`CARGO_WORKSPACE_DIR` would be for path dependencies into foreign
workspaces *and* it wouldn't solve the problem the user is having.

What the user really wants is the CWD of rustc when it is invoked.
This is much simpler to describe and is accurate when using a path
dependency to a foreign package.

Because the CWD is a much simpler mechanism to talk about, I figured we
could diverge from our prior consensus and make it always present,
rather than limiting it to tests.

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

The preparatory refactor commits have explanation for why they were to help

### Additional information

Remaining work for #3946: get this stabilized
2023-11-24 16:20:51 +00:00
bors
22bbc95f3c Auto merge of #12995 - linyihai:issue_11383, r=weihanglo
Exited with hard error when custom build file no existence or not in package

## What does this PR try to resolve?
Fixed https://github.com/rust-lang/cargo/issues/11383

## How should we test and review this PR?
Add test `build_script_outside_pkg_root`,  this will check `custom_build.rs` existence and whether in the package root, if not then exited with a hard error

## Additional information
The code just handle the `custom build` target that i know how to test it.  Other target type is skipped.
2023-11-24 01:41:19 +00:00
bors
527b35e571 Auto merge of #13042 - tompscanlan:13033-windows-test, r=weihanglo
try running on windows

### What does this PR try to resolve?
Try getting rustfix tests to run on windows and fix #13033

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

CI should catch failure. Look out for flaky tests in the long run.

### Additional information

tested briefly on win11.
2023-11-24 00:19:22 +00:00
Tom Scanlan
e9e22e5c2f try running on windows 2023-11-23 18:34:56 -05:00
Ed Page
71172d52b5 fix(resolver): Remove unused public-deps error handling
To implement rust-lang/rfcs#3516, we need to decouple the resolver's
behavior from the unstable flag.  Since the code path is now dead, I
went ahead and removed it.
2023-11-22 15:20:10 -06:00
bors
463f307425 Auto merge of #13021 - epage:inherit, r=weihanglo
refactor(toml): Better abstract inheritance details

There is no reason that the caller for inheriting needs to know the details of the inner types doing inheritance.
2023-11-22 14:46:00 +00:00
Lin Yihai
75aaa40c78 Remove the unnecessary backticks 2023-11-22 11:09:55 +08:00