18899 Commits

Author SHA1 Message Date
Weihang Lo
692d830e2f
refactor(fingerprint): avoid unnecessary fopen calls
This was found by @kobzol.

While not in a hot path, it is no harm to do this tiny thing now.
2024-10-24 10:27:27 -04:00
Ed Page
56f008da47 feat(complete): Include descriptions in zsh 2024-10-23 20:18:11 -05:00
bors
944559f3f5 Auto merge of #14725 - epage:resolver-docs, r=weihanglo
docs(resolver): Make room for v3 resolver
2024-10-23 20:45:00 +00:00
Ed Page
0d2ada8690 docs(resolver): Make room for v3 resolver 2024-10-23 15:27:06 -05:00
Ed Page
487bbc813f test(install): Verify edition=2024 is ignored 2024-10-23 15:15:02 -05:00
Ed Page
49f096edaf test(install): Verify resolver=3 is ignored 2024-10-23 15:14:08 -05:00
Ed Page
646e29abb5 feat(test): Allow setting edition on published packages 2024-10-23 15:14:08 -05:00
Ed Page
255f622299 feat(test): Allow setting resolver on published packages 2024-10-23 14:53:46 -05:00
todd
c84799257f test: add test case to check replace-with error message
The test is used to duplicate #14697
2024-10-23 20:30:12 +08:00
Jakub Beránek
92cf8134bc Switch CI from bors to merge queue 2024-10-22 22:45:21 +02:00
bors
42f41439b2 Auto merge of #14707 - x-hgg-x:sat-fixes, r=Eh2406
test: add fixes in the sat resolver

### What does this PR try to resolve?

This is a follow-up of https://github.com/rust-lang/cargo/pull/14614.

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

Commit 1 removes duplicate variables in the sat resolver.
Commit 2 removes useless clones in the sat resolver.

r? Eh2406
2024-10-22 18:17:36 +00:00
bors
edd36eba5e Auto merge of #14711 - epage:msrc-ci, r=weihanglo
docs(ci): Don't constrainty latest_deps job by MSRV

Missed this in #14639
2024-10-21 02:49:21 +00:00
Ed Page
65aff1fbb4 docs(ci): Don't constrainty latest_deps job by MSRV 2024-10-21 10:28:26 +08:00
bors
b44c54dc15 Auto merge of #14702 - weihanglo:1.82, r=epage
refactor: use `Iterator::is_sorted`
2024-10-21 02:17:45 +00:00
bors
90aee40dcf Auto merge of #14710 - weihanglo:rustfix, r=epage
refactor(rustfix): minor refactors
2024-10-21 01:46:24 +00:00
Weihang Lo
c9102e54bb
refactor(rustfix): only compute snippets when needed 2024-10-20 20:42:22 -04:00
Weihang Lo
f483dc0b95
refactor(rustfix): simplify debug print for Span 2024-10-20 20:42:22 -04:00
Weihang Lo
6ac20fd1be
refactor(rustfix): remove unnecessary indentations 2024-10-20 20:42:22 -04:00
Weihang Lo
446e3f05ba
chore(rustfix): bump to 0.8.8 2024-10-20 20:42:22 -04:00
x-hgg-x
c85d8329d0 test: Avoid needlessly cloning in the sat resolver 2024-10-19 21:57:45 +02:00
x-hgg-x
af9b2d75a5 test: Avoid creating duplicate variables in the sat resolver 2024-10-19 21:57:30 +02:00
Weihang Lo
a8153f2755
refactor: use Iterator::is_sorted 2024-10-19 12:13:18 -04:00
bors
45ad48367f Auto merge of #14705 - rust-lang:renovate/msrv, r=weihanglo
chore(deps): update msrv

This PR contains the following updates:

| Package | Update | Change | Pending |
|---|---|---|---|
| [MSRV:1](https://redirect.github.com/rust-lang/rust) | minor | `1.81` -> `1.82` |  |
| [MSRV:3](https://redirect.github.com/rust-lang/rust) | minor | `1.78` -> `1.79` | `1.82` (+2) |

---

### Release Notes

<details>
<summary>rust-lang/rust (MSRV:1)</summary>

### [`v1.82`](https://redirect.github.com/rust-lang/rust/blob/HEAD/RELEASES.md#Version-1820-2024-10-17)

[Compare Source](https://redirect.github.com/rust-lang/rust/compare/1.81.0...1.82.0)

\==========================

<a id="1.82.0-Language"></a>

## Language

-   [Don't make statement nonterminals match pattern nonterminals](https://redirect.github.com/rust-lang/rust/pull/120221/)
-   [Patterns matching empty types can now be omitted in common cases](https://redirect.github.com/rust-lang/rust/pull/122792)
-   [Enforce supertrait outlives obligations when using trait impls](https://redirect.github.com/rust-lang/rust/pull/124336)
-   [`addr_of(_mut)!` macros and the newly stabilized `&raw (const|mut)` are now safe to use with all static items](https://redirect.github.com/rust-lang/rust/pull/125834)
-   [size_of_val_raw: for length 0 this is safe to call](https://redirect.github.com/rust-lang/rust/pull/126152/)
-   [Reorder trait bound modifiers *after* `for<...>` binder in trait bounds](https://redirect.github.com/rust-lang/rust/pull/127054/)
-   [Stabilize opaque type precise capturing (RFC 3617)](https://redirect.github.com/rust-lang/rust/pull/127672)
-   [Stabilize `&raw const` and `&raw mut` operators (RFC 2582)](https://redirect.github.com/rust-lang/rust/pull/127679)
-   [Stabilize unsafe extern blocks (RFC 3484)](https://redirect.github.com/rust-lang/rust/pull/127921)
-   [Stabilize nested field access in `offset_of!`](https://redirect.github.com/rust-lang/rust/pull/128284)
-   [Do not require `T` to be live when dropping `[T; 0]`](https://redirect.github.com/rust-lang/rust/pull/128438)
-   [Stabilize `const` operands in inline assembly](https://redirect.github.com/rust-lang/rust/pull/128570)
-   [Stabilize floating-point arithmetic in `const fn`](https://redirect.github.com/rust-lang/rust/pull/128596)
-   [Stabilize explicit opt-in to unsafe attributes](https://redirect.github.com/rust-lang/rust/pull/128771)
-   [Document NaN bit patterns guarantees](https://redirect.github.com/rust-lang/rust/pull/129559)

<a id="1.82.0-Compiler"></a>

## Compiler

-   [Promote riscv64gc-unknown-linux-musl to tier 2](https://redirect.github.com/rust-lang/rust/pull/122049)
-   [Promote Mac Catalyst targets `aarch64-apple-ios-macabi` and `x86_64-apple-ios-macabi` to Tier 2, and ship them with rustup](https://redirect.github.com/rust-lang/rust/pull/126450)
-   [Add tier 3 NuttX based targets for RISC-V and ARM](https://redirect.github.com/rust-lang/rust/pull/127755)
-   [Add tier 3 powerpc-unknown-linux-muslspe target](https://redirect.github.com/rust-lang/rust/pull/127905)
-   [Improved diagnostics to explain why a pattern is unreachable](https://redirect.github.com/rust-lang/rust/pull/128034)
-   [The compiler now triggers the unreachable code warning properly for async functions that don't return/are `-> !`](https://redirect.github.com/rust-lang/rust/pull/128443)
-   [Promote `aarch64-apple-darwin` to Tier 1](https://redirect.github.com/rust-lang/rust/pull/128592)
-   [Add Trusty OS target `aarch64-unknown-trusty` and `armv7-unknown-trusty` as tier 3 targets](https://redirect.github.com/rust-lang/rust/pull/129490)
-   [Promote `wasm32-wasip2` to Tier 2.](https://redirect.github.com/rust-lang/rust/pull/126967/)

<a id="1.82.0-Libraries"></a>

## Libraries

-   [Generalize `{Rc,Arc}::make_mut()` to `Path`, `OsStr`, and `CStr`.](https://redirect.github.com/rust-lang/rust/pull/126877)

<a id="1.82.0-Stabilized-APIs"></a>

## Stabilized APIs

-   [`std:🧵:Builder::spawn_unchecked`](https://doc.rust-lang.org/stable/std/thread/struct.Builder.html#method.spawn_unchecked)
-   [`std::str::CharIndices::offset`](https://doc.rust-lang.org/nightly/std/str/struct.CharIndices.html#method.offset)
-   [`std::option::Option::is_none_or`](https://doc.rust-lang.org/nightly/std/option/enum.Option.html#method.is_none_or)
-   [`[T]::is_sorted`](https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.is_sorted)
-   [`[T]::is_sorted_by`](https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.is_sorted_by)
-   [`[T]::is_sorted_by_key`](https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.is_sorted_by_key)
-   [`Iterator::is_sorted`](https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.is_sorted)
-   [`Iterator::is_sorted_by`](https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.is_sorted_by)
-   [`Iterator::is_sorted_by_key`](https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.is_sorted_by_key)
-   [`std::future::Ready::into_inner`](https://doc.rust-lang.org/nightly/std/future/struct.Ready.html#method.into_inner)
-   [`std::iter::repeat_n`](https://doc.rust-lang.org/nightly/std/iter/fn.repeat_n.html)
-   [`impl<T: Clone> DoubleEndedIterator for Take<Repeat<T>>`](https://doc.rust-lang.org/nightly/std/iter/struct.Take.html#impl-DoubleEndedIterator-for-Take%3CRepeat%3CT%3E%3E)
-   [`impl<T: Clone> ExactSizeIterator for Take<Repeat<T>>`](https://doc.rust-lang.org/nightly/std/iter/struct.Take.html#impl-ExactSizeIterator-for-Take%3CRepeat%3CT%3E%3E)
-   [`impl<T: Clone> ExactSizeIterator for Take<RepeatWith<T>>`](https://doc.rust-lang.org/nightly/std/iter/struct.Take.html#impl-ExactSizeIterator-for-Take%3CRepeatWith%3CF%3E%3E)
-   [`impl Default for std::collections::binary_heap::Iter`](https://doc.rust-lang.org/nightly/std/collections/binary_heap/struct.Iter.html#impl-Default-for-Iter%3C'\_,+T%3E)
-   [`impl Default for std::collections::btree_map::RangeMut`](https://doc.rust-lang.org/nightly/std/collections/btree_map/struct.RangeMut.html#impl-Default-for-RangeMut%3C'\_,+K,+V%3E)
-   [`impl Default for std::collections::btree_map::ValuesMut`](https://doc.rust-lang.org/nightly/std/collections/btree_map/struct.ValuesMut.html#impl-Default-for-ValuesMut%3C'\_,+K,+V%3E)
-   [`impl Default for std::collections::vec_deque::Iter`](https://doc.rust-lang.org/nightly/std/collections/vec_deque/struct.Iter.html#impl-Default-for-Iter%3C'\_,+T%3E)
-   [`impl Default for std::collections::vec_deque::IterMut`](https://doc.rust-lang.org/nightly/std/collections/vec_deque/struct.IterMut.html#impl-Default-for-IterMut%3C'\_,+T%3E)
-   [`Rc<T>::new_uninit`](https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.new_uninit)
-   [`Rc<T>::assume_init`](https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.assume_init)
-   [`Rc<[T]>::new_uninit_slice`](https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.new_uninit_slice)
-   [`Rc<[MaybeUninit<T>]>::assume_init`](https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.assume_init-1)
-   [`Arc<T>::new_uninit`](https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.new_uninit)
-   [`Arc<T>::assume_init`](https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.assume_init)
-   [`Arc<[T]>::new_uninit_slice`](https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.new_uninit_slice)
-   [`Arc<[MaybeUninit<T>]>::assume_init`](https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.assume_init-1)
-   [`Box<T>::new_uninit`](https://doc.rust-lang.org/nightly/std/boxed/struct.Box.html#method.new_uninit)
-   [`Box<T>::assume_init`](https://doc.rust-lang.org/nightly/std/boxed/struct.Box.html#method.assume_init)
-   [`Box<[T]>::new_uninit_slice`](https://doc.rust-lang.org/nightly/std/boxed/struct.Box.html#method.new_uninit_slice)
-   [`Box<[MaybeUninit<T>]>::assume_init`](https://doc.rust-lang.org/nightly/std/boxed/struct.Box.html#method.assume_init-1)
-   [`core::arch::x86_64::_bextri_u64`](https://doc.rust-lang.org/stable/core/arch/x86\_64/fn.\_bextri_u64.html)
-   [`core::arch::x86_64::_bextri_u32`](https://doc.rust-lang.org/stable/core/arch/x86\_64/fn.\_bextri_u32.html)
-   [`core::arch::x86::_mm_broadcastsi128_si256`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_broadcastsi128\_si256.html)
-   [`core::arch::x86::_mm256_stream_load_si256`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm256\_stream_load_si256.html)
-   [`core::arch::x86::_tzcnt_u16`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_tzcnt_u16.html)
-   [`core::arch::x86::_mm_extracti_si64`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_extracti_si64.html)
-   [`core::arch::x86::_mm_inserti_si64`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_inserti_si64.html)
-   [`core::arch::x86::_mm_storeu_si16`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_storeu_si16.html)
-   [`core::arch::x86::_mm_storeu_si32`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_storeu_si32.html)
-   [`core::arch::x86::_mm_storeu_si64`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_storeu_si64.html)
-   [`core::arch::x86::_mm_loadu_si16`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_loadu_si16.html)
-   [`core::arch::x86::_mm_loadu_si32`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_loadu_si32.html)
-   [`core::arch::wasm32::u8x16_relaxed_swizzle`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u8x16\_relaxed_swizzle.html)
-   [`core::arch::wasm32::i8x16_relaxed_swizzle`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i8x16\_relaxed_swizzle.html)
-   [`core::arch::wasm32::i32x4_relaxed_trunc_f32x4`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i32x4\_relaxed_trunc_f32x4.html)
-   [`core::arch::wasm32::u32x4_relaxed_trunc_f32x4`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u32x4\_relaxed_trunc_f32x4.html)
-   [`core::arch::wasm32::i32x4_relaxed_trunc_f64x2_zero`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i32x4\_relaxed_trunc_f64x2\_zero.html)
-   [`core::arch::wasm32::u32x4_relaxed_trunc_f64x2_zero`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u32x4\_relaxed_trunc_f64x2\_zero.html)
-   [`core::arch::wasm32::f32x4_relaxed_madd`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f32x4\_relaxed_madd.html)
-   [`core::arch::wasm32::f32x4_relaxed_nmadd`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f32x4\_relaxed_nmadd.html)
-   [`core::arch::wasm32::f64x2_relaxed_madd`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f64x2\_relaxed_madd.html)
-   [`core::arch::wasm32::f64x2_relaxed_nmadd`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f64x2\_relaxed_nmadd.html)
-   [`core::arch::wasm32::i8x16_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i8x16\_relaxed_laneselect.html)
-   [`core::arch::wasm32::u8x16_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u8x16\_relaxed_laneselect.html)
-   [`core::arch::wasm32::i16x8_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i16x8\_relaxed_laneselect.html)
-   [`core::arch::wasm32::u16x8_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u16x8\_relaxed_laneselect.html)
-   [`core::arch::wasm32::i32x4_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i32x4\_relaxed_laneselect.html)
-   [`core::arch::wasm32::u32x4_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u32x4\_relaxed_laneselect.html)
-   [`core::arch::wasm32::i64x2_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i64x2\_relaxed_laneselect.html)
-   [`core::arch::wasm32::u64x2_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u64x2\_relaxed_laneselect.html)
-   [`core::arch::wasm32::f32x4_relaxed_min`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f32x4\_relaxed_min.html)
-   [`core::arch::wasm32::f32x4_relaxed_max`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f32x4\_relaxed_max.html)
-   [`core::arch::wasm32::f64x2_relaxed_min`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f64x2\_relaxed_min.html)
-   [`core::arch::wasm32::f64x2_relaxed_max`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f64x2\_relaxed_max.html)
-   [`core::arch::wasm32::i16x8_relaxed_q15mulr`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i16x8\_relaxed_q15mulr.html)
-   [`core::arch::wasm32::u16x8_relaxed_q15mulr`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u16x8\_relaxed_q15mulr.html)
-   [`core::arch::wasm32::i16x8_relaxed_dot_i8x16_i7x16`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i16x8\_relaxed_dot_i8x16\_i7x16.html)
-   [`core::arch::wasm32::u16x8_relaxed_dot_i8x16_i7x16`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u16x8\_relaxed_dot_i8x16\_i7x16.html)
-   [`core::arch::wasm32::i32x4_relaxed_dot_i8x16_i7x16_add`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i32x4\_relaxed_dot_i8x16\_i7x16\_add.html)
-   [`core::arch::wasm32::u32x4_relaxed_dot_i8x16_i7x16_add`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u32x4\_relaxed_dot_i8x16\_i7x16\_add.html)

These APIs are now stable in const contexts:

-   [`std::task::Waker::from_raw`](https://doc.rust-lang.org/nightly/std/task/struct.Waker.html#method.from_raw)
-   [`std::task::Context::from_waker`](https://doc.rust-lang.org/nightly/std/task/struct.Context.html#method.from_waker)
-   [`std::task::Context::waker`](https://doc.rust-lang.org/nightly/std/task/struct.Context.html#method.waker)
-   [`$integer::from_str_radix`](https://doc.rust-lang.org/nightly/std/primitive.u32.html#method.from_str_radix)
-   [`std::num::ParseIntError::kind`](https://doc.rust-lang.org/nightly/std/num/struct.ParseIntError.html#method.kind)

<a id="1.82.0-Cargo"></a>

## Cargo

-   [feat: Add `info` cargo subcommand](https://redirect.github.com/rust-lang/cargo/pull/14141/)

<a id="1.82.0-Compatibility-Notes"></a>

## Compatibility Notes

-   We now [disallow setting some built-in cfgs via the command-line](https://redirect.github.com/rust-lang/rust/pull/126158) with the newly added [`explicit_builtin_cfgs_in_flags`](https://doc.rust-lang.org/rustc/lints/listing/deny-by-default.html#explicit-builtin-cfgs-in-flags) lint in order to prevent incoherent state, eg. `windows` cfg active but target is Linux based. The appropriate [`rustc` flag](https://doc.rust-lang.org/rustc/command-line-arguments.html) should be used instead.
-   The standard library has a new implementation of `binary_search` which is significantly improves performance ([#&#8203;128254](https://redirect.github.com/rust-lang/rust/pull/128254)). However when a sorted slice has multiple values which compare equal, the new implementation may select a different value among the equal ones than the old implementation.
-   [illumos/Solaris now sets `MSG_NOSIGNAL` when writing to sockets](https://redirect.github.com/rust-lang/rust/pull/128259). This avoids killing the process with SIGPIPE when writing to a closed socket, which matches the existing behavior on other UNIX targets.
-   [Removes a problematic hack that always passed the --whole-archive linker flag for tests, which may cause linker errors for code accidentally relying on it.](https://redirect.github.com/rust-lang/rust/pull/128400)
-   The WebAssembly target features `multivalue` and `reference-types` are now
    both enabled by default. These two features both have subtle changes implied
    for generated WebAssembly binaries. For the `multivalue` feature, WebAssembly
    target support has changed when upgrading to LLVM 19. Support for generating
    functions with multiple returns no longer works and
    `-Ctarget-feature=+multivalue` has a different meaning than it did in LLVM 18
    and prior. There is no longer any supported means to generate a module that has
    a function with multiple returns in WebAssembly from Rust source code. For the
    `reference-types` feature the encoding of immediates in the `call_indirect`, a
    commonly used instruction by the WebAssembly backend, has changed. Validators
    and parsers which don't understand the `reference-types` proposal will no
    longer accept modules produced by LLVM due to this change in encoding of
    immediates. Additionally these features being enabled are encoded in the
    `target_features` custom section and may affect downstream tooling such as
    `wasm-opt` consuming the module. Generating a WebAssembly module that disables
    default features requires `-Zbuild-std` support from Cargo and more information
    can be found at
    [rust-lang/rust#128511](https://redirect.github.com/rust-lang/rust/pull/128511).
-   [Rust now raises unsafety errors for union patterns in parameter-position](https://redirect.github.com/rust-lang/rust/pull/130531)

<a id="1.82.0-Internal-Changes"></a>

## Internal Changes

These changes do not affect any public interfaces of Rust, but they represent
significant improvements to the performance or internals of rustc and related
tools.

-   [Update to LLVM 19](https://redirect.github.com/rust-lang/rust/pull/127513)

</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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired.

---

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

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/rust-lang/cargo).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMjAuMSIsInVwZGF0ZWRJblZlciI6IjM4LjEyMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
2024-10-19 05:52:07 +00:00
renovate[bot]
341d619f66
chore(deps): update msrv 2024-10-19 01:35:59 -04:00
bors
23c36f5f83 Auto merge of #14704 - Muscraft:fix-renovate, r=weihanglo
fix(renovate): Switch matchPackageNames to matchDepNames

When talking to `@weihanglo` about #14703, it was noticed that `renovate` was ignoring `extractVersion` and `schedule` for [`MSRV:1`](cf53cc54bb/.github/renovate.json5 (L50-L53)) and [`MSRV:3`](cf53cc54bb/.github/renovate.json5 (L64-L67)). After a lot of digging into why that was happening, I figured out that it was caused by a [breaking change in `renovate@38`](https://github.com/renovatebot/renovate/releases/tag/38.0.0):
> **package-rules**: `matchPackageNames` and related functions no longer fall back to checking `depName`.

This change caused `renovate` to no longer apply the configuration from `packageRules` to `MSRV:1` and `MSRV:3` as the `customManagers` for both specified [`depNameTemplate`](cf53cc54bb/.github/renovate.json5 (L23)) which is no longer being read.

To fix this issue, I changed `matchPackageNames` to `matchDepNames`, which solved the issue when I was testing locally.
2024-10-19 03:50:07 +00:00
Scott Schafer
449d6cb356
fix(renovate): Switch matchPackageNames to matchDepNames 2024-10-18 21:13:36 -06:00
bors
cf53cc54bb Auto merge of #14639 - epage:stabilize-msrv-config, r=weihanglo
feat: Stabilize MSRV-aware resolver config

### What does this PR try to resolve?

This includes
- `cargo generate-lockfile --ignore-rust-version`
- `cargo update --ignore-rust-version`

This does not include
- `edition = "2024"`
- `resolver = "3"`

This is part of #9930

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

### Additional information

This is stacked on top of #14636.  The commits for this PR start with the commit with a title that matches the PR title.

[FCP](https://github.com/rust-lang/cargo/pull/14639#issuecomment-2392172716)
2024-10-18 13:56:15 +00:00
bors
6f92aaa31f Auto merge of #14700 - kornelski:patchdash, r=weihanglo
Help with [patch.crates.io]

This catches a syntactical mistake in TOML that's easy to make by patching `[patch.crates.io]` instead of `[patch.crates-io]`.

```diff
 error: failed to parse manifest at `Cargo.toml`

 Caused by:
   [patch] entry `crates` should be a URL or registry name
+  For crates.io, use [patch.crates-io] (with a dash)

 Caused by:
   invalid url `crates`: relative URL without a base
 ```
2024-10-17 11:26:30 +00:00
Kornel
b07c611bf1
Help with [patch.crates.io] 2024-10-17 11:15:10 +01:00
bors
2835ddc2cc Auto merge of #14642 - epage:test-publish, r=weihanglo
test: Migrate publish snapshotting to snapbox

### What does this PR try to resolve?

This is part of #14039 and allows snapshotting in more places.

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

### Additional information

`InMemoryDir` is taken from some experiments I've been doing in snapshot for filesystem assertions.  That got held up because of design complexity but publish validation's needs are simpler than I was designing for.
2024-10-16 23:40:27 +00:00
Ed Page
5b84fc99c5 feat(test): Snapshot .crate validation 2024-10-17 06:26:47 +08:00
Ed Page
5c25f7a9b8 refactor(test): Simplify handling of tar file prefixes 2024-10-17 06:26:47 +08:00
Ed Page
6d048153b3 refactor(test): Pull out new POST parsing 2024-10-17 06:26:47 +08:00
Ed Page
e52b041a4d chore(test): Bump to 0.6 2024-10-17 06:26:47 +08:00
bors
ca1483610f Auto merge of #14695 - weihanglo:version-bump, r=epage
Bump to 0.85.0; update changelog
2024-10-16 02:23:06 +00:00
Weihang Lo
21826b3d39
docs: update changelog for 1.84.0 2024-10-15 21:36:57 -04:00
Weihang Lo
7baa6ba9b6
docs: update changelog for 1.83.0 2024-10-15 21:36:56 -04:00
bors
6fb5d53be7 Auto merge of #14696 - addykan:patch-1, r=epage
Fix typo in faq.md

The opening backtick for the code snippet was in the wrong place, causing the URL to not render correctly.
2024-10-15 22:53:09 +00:00
Adhvik Kanagala
8c35950586
Fix typo
The opening backtick for the code snippet was in the wrong place, causing the URL to not render correctly.
2024-10-15 18:21:25 -04:00
bors
79a491a8b4 Auto merge of #14694 - arlosi:fix-extra-blocking, r=weihanglo
fix(registry): `HttpRegistry` `block_until_ready` returns early when work is still pending

### What does this PR try to resolve?

`block_until_ready` is returning early when there are still pending transfers. This leads to extra restarts of the resolver, impacting performance.

In the existing implementation:
- `handle_completed_downloads` runs and there are no completed downloads
- `multi.perform()` is called and completes new downloads, with no pending transfers remaining
- Since there are no items `remaining_in_multi`, the function returns early

This fixes the issue by reordering the calls to `multi.perform()`, `handle_completed_downloads`, then the completion check.

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

A test is added that uses cargo's tracing to show the number of blocking calls. First commit shows existing behavior, second commit shows fix.

Originally based on the PR #14680 by `@x-hgg-x.` The ordering fix in this PR also avoids an additional `block_until_ready` call for retried failed downloads.
2024-10-15 21:35:40 +00:00
bors
8040c0051d Auto merge of #14690 - x-hgg-x:resolver-perf-3, r=Eh2406
fix(resolver): avoid cloning when iterating using RcVecIter

### What does this PR try to resolve?

Follow up of https://github.com/Eh2406/pubgrub-crates-benchmark/issues/6#issuecomment-2408905423.

This PR modifies the internal `RcVecIter` struct so that we can iterate on its items without cloning them. This improves performance of the resolver because eagerly cloning `Arc<T>` is not free.

Comparison of performance using `solana-core = "=1.0.5"` in `Cargo.toml`:

| branch     | duration |
|------------|----------|
| master     | 213s     |
| PR         | 202s     |

r? Eh2406
2024-10-15 18:08:23 +00:00
Arlo Siemsen
8db2192bba fix: block_until_ready can return early when there is still pending work 2024-10-15 12:58:38 -05:00
Arlo Siemsen
b0b6b16278 add test to show existing behavior of block_until_ready 2024-10-15 12:58:38 -05:00
x-hgg-x
5acc1ca952 fix(resolver): avoid cloning when iterating using RcVecIter 2024-10-15 19:13:17 +02:00
bors
8c30ce5368 Auto merge of #14684 - sourcefrog:package-help, r=weihanglo
docs: More information on what is and isn't included by cargo package

<!-- homu-ignore:start -->
<!--
Thanks for submitting a pull request 🎉! Here are some tips for you:

* If this is your first contribution, read "Cargo Contribution Guide" first:
  https://doc.crates.io/contrib/
* Run `cargo fmt --all` to format your code changes.
* Small commits and pull requests are always preferable and easy to review.
* If your idea is large and needs feedback from the community, read how:
  https://doc.crates.io/contrib/process/#working-on-large-features
* Cargo takes care of compatibility. Read our design principles:
  https://doc.crates.io/contrib/design.html
* When changing help text of cargo commands, follow the steps to generate docs:
  https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages
* If your PR is not finished, set it as "draft" PR or add "WIP" in its title.
* It's ok to use the CI resources to test your PR, but please don't abuse them.
-->

### What does this PR try to resolve?

Add more detail to `cargo package` explaining what is and isn't included.

This doesn't add the feature requested by #11203 (shipping symlinks) but it does at least make it more clear that it's not supported.

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

Docs only change.

I wrote this by reading [src/cargo/sources/path.rs](82c489f1c6/src/cargo/sources/path.rs), in addition to my observations of cargo behavior, so it might be helpful for reviewers to check the new docs against the code.
2024-10-15 16:43:16 +00:00
Weihang Lo
6f92802dd1
Bump to 0.85.0 2024-10-15 12:26:42 -04:00
bors
430fabeaa8 Auto merge of #14692 - x-hgg-x:resolver-perf-5, r=Eh2406
fix(resolver): share conflict cache between activation retries

### What does this PR try to resolve?

Found in https://github.com/Eh2406/pubgrub-crates-benchmark/issues/6.

Currently the resolve is done in a loop, restarting if there are pending dependencies which are not yet fetched, and recreating the conflict cache at each iteration.

This means we do a lot of duplicate work, especially if the newly fetched dependencies has zero or few dependencies which doesn't conflict.

This also means that the maximum depth of the dependency graph has a big impact on the total resolving time, since adding a dependency not yet seen means we will restart the resolve at the next iteration.

Here is the output of the resolve for the master branch using `solana-core = "=1.2.18"` in `Cargo.toml`, printing the duration from the start after each iteration:
```
    Updating crates.io index
103.142341ms   [=====>                           ] 1 complete; 0 pending
118.486144ms   [========>                        ] 2 complete; 0 pending
785.389055ms   [===========>                     ] 62 complete; 0 pending
4.916033377s   [==============>                  ] 277 complete; 0 pending
9.13101404s    [=================>               ] 439 complete; 0 pending
50.083251549s  [====================>            ] 520 complete; 0 pending
133.401303265s [=======================>         ] 561 complete; 0 pending
214.120483345s [==========================>      ] 565 complete; 0 pending
294.180677785s [=============================>   ] 566 complete; 0 pending
    Locking 536 packages to latest compatible versions
```

To improve the situation, this PR moves the conflict cache outside the activation loop so it can be reused for all iterations.

This is possible since when using an online registry, dependencies which are not yet fetched are not added to the candidate summary:

82c489f1c6/src/cargo/core/resolver/dep_cache.rs (L248-L266)

On the other hand, if a dependency query returns `Poll::Ready`, then all compatible summaries are returned, so we cannot have a partial view where only some compatible summaries would be returned. This means we cannot add a conflict in the cache which would be incompatible with future fetches, and therefore the conflict cache can be shared.

Here is the output of the resolve with this PR:
```
    Updating crates.io index
98.239126ms   [=====>                           ] 1 complete; 0 pending
127.528982ms  [========>                        ] 2 complete; 0 pending
821.601257ms  [===========>                     ] 62 complete; 0 pending
4.67917132s   [==============>                  ] 277 complete; 0 pending
5.933230172s  [=================>               ] 431 complete; 0 pending
14.74321904s  [====================>            ] 508 complete; 0 pending
24.607428893s [=======================>         ] 546 complete; 0 pending
24.700610469s [==========================>      ] 550 complete; 0 pending
24.757651875s [=============================>   ] 551 complete; 0 pending
    Locking 536 packages to latest compatible versions
```

Besides the huge performance savings between iterations, sharing the conflict cache has the side effect of eliminating dead paths earlier in the resolve after a restart. We can see that the duration of all iterations using this PR is less than the duration of the last iteration on master, and that it needs to resolve less dependencies overall.
2024-10-15 15:00:44 +00:00
Martin Pool
b8125da4e8 chore: cargo build-man 2024-10-15 07:58:27 -07:00
Martin Pool
83ae3b771e
Point to existing docs about include/exclude fields
Co-authored-by: Weihang Lo <weihanglo@users.noreply.github.com>
2024-10-15 07:57:28 -07:00
x-hgg-x
46ea11a217 fix(resolver): share conflict cache between activation retries 2024-10-15 12:32:06 +02:00