20068 Commits

Author SHA1 Message Date
Eric Huss
609d608df7 Fix deprecated method names 2025-04-04 16:27:53 -07:00
Eric Huss
05847378cf
chore(ci): restore cargo-util semver check (#15389)
### What does this PR try to resolve?

Basically a revert of <https://github.com/rust-lang/cargo/pull/15222>.
2025-04-04 23:23:22 +00:00
dependabot[bot]
19fa740c79
chore(deps): bump openssl from 0.10.71 to 0.10.72
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.71 to 0.10.72.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.71...openssl-v0.10.72)

---
updated-dependencies:
- dependency-name: openssl
  dependency-version: 0.10.72
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-04 20:55:34 +00:00
renovate[bot]
333aa65691
chore(deps): update rust crate gix to 0.71.0 [security] 2025-04-04 19:26:45 +00:00
Weihang Lo
b955cd1822
chore(ci): restore cargo-util semver check 2025-04-04 08:05:43 -07:00
Eric Huss
b909a8be44
docs(changelog): polish changelog items (#15379)
They are supposed to be sorted and have proper prefixes.
2025-04-03 17:08:55 +00:00
Eric Huss
59f0fcfbb9
chore(deps): update msrv (1 version) to v1.86 (#15381)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [MSRV:1](https://redirect.github.com/rust-lang/rust) | minor | `1.85`
-> `1.86` |

---

### Release Notes

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

###
[`v1.86`](https://redirect.github.com/rust-lang/rust/blob/HEAD/RELEASES.md#Version-1860-2025-04-03)

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

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

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

## Language

- [Stabilize upcasting trait objects to
supertraits.](https://redirect.github.com/rust-lang/rust/pull/134367)
- [Allow safe functions to be marked with the `#[target_feature]`
attribute.](https://redirect.github.com/rust-lang/rust/pull/134090)
- [The `missing_abi` lint now
warns-by-default.](https://redirect.github.com/rust-lang/rust/pull/132397)
- Rust now lints about double negations, to catch cases that might have
intended to be a prefix decrement operator (`--x`) as written in other
languages. This was previously a clippy lint, `clippy::double_neg`, and
is [now available directly in Rust as
`double_negations`.](https://redirect.github.com/rust-lang/rust/pull/126604)
- [More pointers are now detected as definitely not-null based on their
alignment in const
eval.](https://redirect.github.com/rust-lang/rust/pull/133700)
- [Empty `repr()` attribute applied to invalid items are now correctly
rejected.](https://redirect.github.com/rust-lang/rust/pull/133925)
- [Inner attributes `#![test]` and `#![rustfmt::skip]` are no longer
accepted in more places than
intended.](https://redirect.github.com/rust-lang/rust/pull/134276)

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

## Compiler

- [Debug-assert that raw pointers are non-null on
access.](https://redirect.github.com/rust-lang/rust/pull/134424)
- [Change `-O` to mean `-C opt-level=3` instead of `-C opt-level=2` to
match Cargo's
defaults.](https://redirect.github.com/rust-lang/rust/pull/135439)
- [Fix emission of `overflowing_literals` under certain macro
environments.](https://redirect.github.com/rust-lang/rust/pull/136393)

<a id="1.86.0-Platform-Support"></a>

## Platform Support

- [Replace `i686-unknown-redox` target with
`i586-unknown-redox`.](https://redirect.github.com/rust-lang/rust/pull/136698)
- [Increase baseline CPU of `i686-unknown-hurd-gnu` to Pentium
4.](https://redirect.github.com/rust-lang/rust/pull/136700)
-   New tier 3 targets:
-
[`{aarch64-unknown,x86_64-pc}-nto-qnx710_iosock`](https://redirect.github.com/rust-lang/rust/pull/133631).
        For supporting Neutrino QNX 7.1 with `io-socket` network stack.
-
[`{aarch64-unknown,x86_64-pc}-nto-qnx800`](https://redirect.github.com/rust-lang/rust/pull/133631).
        For supporting Neutrino QNX 8.0 (`no_std`-only).
-
[`{x86_64,i686}-win7-windows-gnu`](https://redirect.github.com/rust-lang/rust/pull/134609).
Intended for backwards compatibility with Windows 7.
`{x86_64,i686}-win7-windows-msvc` are the Windows MSVC counterparts that
already exist as Tier 3 targets.
-
[`amdgcn-amd-amdhsa`](https://redirect.github.com/rust-lang/rust/pull/134740).
-
[`x86_64-pc-cygwin`](https://redirect.github.com/rust-lang/rust/pull/134999).
-
[`{mips,mipsel}-mti-none-elf`](https://redirect.github.com/rust-lang/rust/pull/135074).
        Initial bare-metal support.
-
[`m68k-unknown-none-elf`](https://redirect.github.com/rust-lang/rust/pull/135085).
- [`armv7a-nuttx-{eabi,eabihf}`, `aarch64-unknown-nuttx`, and
`thumbv7a-nuttx-{eabi,eabihf}`](https://redirect.github.com/rust-lang/rust/pull/135757).

Refer to Rust's \[platform support page]\[platform-support-doc]
for more information on Rust's tiered platform support.

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

## Libraries

- The type of `FromBytesWithNulError` in
`CStr::from_bytes_with_nul(bytes: &[u8]) -> Result<&Self,
FromBytesWithNulError>` was [changed from an opaque struct to an
enum](https://redirect.github.com/rust-lang/rust/pull/134143), allowing
users to examine why the conversion failed.
- [Remove `RustcDecodable` and
`RustcEncodable`.](https://redirect.github.com/rust-lang/rust/pull/134272)
- [Deprecate libtest's `--logfile`
option.](https://redirect.github.com/rust-lang/rust/pull/134283)
- [On recent versions of Windows, `std::fs::remove_file` will now remove
read-only
files.](https://redirect.github.com/rust-lang/rust/pull/134679)

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

## Stabilized APIs

-
[`{float}::next_down`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.next_down)
-
[`{float}::next_up`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.next_up)
-
[`<[_]>::get_disjoint_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.get_disjoint_mut)
-
[`<[_]>::get_disjoint_unchecked_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.get_disjoint_unchecked_mut)
-
[`slice::GetDisjointMutError`](https://doc.rust-lang.org/stable/std/slice/enum.GetDisjointMutError.html)
-
[`HashMap::get_disjoint_mut`](https://doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#method.get_disjoint_mut)
-
[`HashMap::get_disjoint_unchecked_mut`](https://doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#method.get_disjoint_unchecked_mut)
-
[`NonZero::count_ones`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.count_ones)
-
[`Vec::pop_if`](https://doc.rust-lang.org/std/vec/struct.Vec.html#method.pop_if)
-
[`sync::Once::wait`](https://doc.rust-lang.org/stable/std/sync/struct.Once.html#method.wait)
-
[`sync::Once::wait_force`](https://doc.rust-lang.org/stable/std/sync/struct.Once.html#method.wait_force)
-
[`sync::OnceLock::wait`](https://doc.rust-lang.org/stable/std/sync/struct.OnceLock.html#method.wait)

These APIs are now stable in const contexts:

-
[`hint::black_box`](https://doc.rust-lang.org/stable/std/hint/fn.black_box.html)
-
[`io::Cursor::get_mut`](https://doc.rust-lang.org/stable/std/io/struct.Cursor.html#method.get_mut)
-
[`io::Cursor::set_position`](https://doc.rust-lang.org/stable/std/io/struct.Cursor.html#method.set_position)
-
[`str::is_char_boundary`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.is_char_boundary)
-
[`str::split_at`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.split_at)
-
[`str::split_at_checked`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.split_at_checked)
-
[`str::split_at_mut`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.split_at_mut)
-
[`str::split_at_mut_checked`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.split_at_mut_checked)

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

## Cargo

- [When merging, replace rather than combine configuration keys that
refer to a program path and its
arguments.](https://redirect.github.com/rust-lang/cargo/pull/15066/)
- [Error if both `--package` and `--workspace` are passed but the
requested package is
missing.](https://redirect.github.com/rust-lang/cargo/pull/15071/) This
was previously silently ignored, which was considered a bug since
missing packages should be reported.
- [Deprecate the token argument in `cargo login` to avoid shell history
leaks.](https://redirect.github.com/rust-lang/cargo/pull/15057/)
- [Simplify the implementation of `SourceID`
comparisons.](https://redirect.github.com/rust-lang/cargo/pull/14980/)
This may potentially change behavior if the canonicalized URL compares
differently in alternative registries.

<a id="1.86.0-Rustdoc"></a>

## Rustdoc

- [Add a sans-serif font
setting.](https://redirect.github.com/rust-lang/rust/pull/133636)

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

## Compatibility Notes

- [The `wasm_c_abi` future compatibility warning is now a hard
error.](https://redirect.github.com/rust-lang/rust/pull/133951)
Users of `wasm-bindgen` should upgrade to at least version 0.2.89,
otherwise compilation will fail.
- [Remove long-deprecated no-op attributes `#![no_start]` and
`#![crate_id]`.](https://redirect.github.com/rust-lang/rust/pull/134300)
- [The future incompatibility lint `cenum_impl_drop_cast` has been made
into a hard
error.](https://redirect.github.com/rust-lang/rust/pull/135964) This
means it is now an error to cast a field-less enum to an integer if the
enum implements `Drop`.
- [SSE2 is now required for "i686" 32-bit x86 hard-float targets;
disabling it causes a warning that will become a hard error
eventually.](https://redirect.github.com/rust-lang/rust/pull/137037)
    To compile for pre-SSE2 32-bit x86, use a "i586" target instead.

<a id="1.86.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.

- [Build the rustc on AArch64 Linux with ThinLTO +
PGO.](https://redirect.github.com/rust-lang/rust/pull/133807)
The ARM 64-bit compiler (AArch64) on Linux is now optimized with ThinLTO
and PGO, similar to the optimizations we have already performed for the
x86-64 compiler on Linux. This should make it up to 30% faster.

</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 was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rust-lang/cargo).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjIyNy4zIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
2025-04-03 14:46:30 +00:00
Eric Huss
be781458a9 Bump versions due to MSRV update 2025-04-03 07:11:48 -07:00
Eric Huss
62bd1ad4bd Update semver test for 1.86 output 2025-04-03 06:34:28 -07:00
renovate[bot]
fc88578277
chore(deps): update msrv (1 version) to v1.86 2025-04-03 12:07:38 +00:00
Weihang Lo
92f8cc9503
docs(changelog): polish changelog items
They are supposed to be sorted and have proper prefixes.
2025-04-02 22:51:45 -07:00
Weihang Lo
f1e447077d
chore: add aarch64 linux runner (#15077)
### What does this PR try to resolve?

Linux arm64 hosted runners is in public preview.
Enable and see if is is something we can have now.

https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/

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

aarch64-unknown-linux-gnu is a tier-1 target platform.
It is better to have this in Cargo's CI.

Cross-compilation tests are disabled temporarily on this platform.

### Additional information

https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/Free.20Linux.20ARM64.20runners.20on.20GHA.20now.20in.20beta
2025-04-02 15:52:23 +00:00
Weihang Lo
253eee4bfb
Added build_directory field to cargo metadata output (#15377)
<!--
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?

Explain the motivation behind this change.
A clear overview along with an in-depth explanation are helpful.

You can use `Fixes #<issue number>` to associate this PR to an existing
issue.

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

Demonstrate how you test this change and guide reviewers through your
PR.
With a smooth review process, a pull request usually gets reviewed
quicker.

If you don't know how to write and run your tests, please read the
guide:
https://doc.crates.io/contrib/tests

### Additional information

Other information you want to mention in this PR, such as prior arts,
future extensions, an unresolved problem, or a TODO list.
-->

### What does this PR try to resolve?

This PR continues on the build-dir work laid in #14125. (see
[this](https://github.com/rust-lang/cargo/issues/14125#issuecomment-2751658701)
comment)

We add a new `build_directory` field to the `cargo metadata` output when
the `-Z build-dir` feature flag is enabled.

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

I added a test for metadata output when build-dir is set. There are
already many existing tests that verify that build-dir is not included
if `-Z build-dir` is not passed.

### Additional information

NOTE: I use `build_directory` instead of `build-dir` to match the
existing `target_directory` field in the metadata output

r? @epage
2025-04-02 13:25:35 +00:00
Ross Sullivan
54e5369584
feat(build-dir): Added build-directory to cargo metadata output 2025-04-02 21:38:35 +09:00
Ross Sullivan
155aaae22e
test(build-dir): Added build_directory field to cargo metadata output 2025-04-02 21:36:05 +09:00
Weihang Lo
2080ac30df
chore(ci): add aarch64 linux runner
Linux arm64 hosted runners is in public preview.
Enable and see if is is something we can have now.

setting `target.linker` is required for cross-compilation
on ARM64, so disable cross compilation tests for it.

https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/
2025-04-01 22:07:36 -07:00
Ed Page
2a5f670ec0
chore(deps): update rust crate rusqlite to 0.34.0 (#15373)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [rusqlite](https://redirect.github.com/rusqlite/rusqlite) |
workspace.dependencies | minor | `0.33.0` -> `0.34.0` |

---

### Release Notes

<details>
<summary>rusqlite/rusqlite (rusqlite)</summary>

###
[`v0.34.0`](https://redirect.github.com/rusqlite/rusqlite/releases/tag/v0.34.0):
0.34.0

[Compare
Source](https://redirect.github.com/rusqlite/rusqlite/compare/v0.33.0...v0.34.0)

#### What's Changed

- Find the system library with minimum version 3.14.0
[#&#8203;1628](https://redirect.github.com/rusqlite/rusqlite/issues/1628)
- Update error type for `ValueRef` methods
[#&#8203;1629](https://redirect.github.com/rusqlite/rusqlite/issues/1629)
- Use decrement_strong_count directly for Array
[#&#8203;1633](https://redirect.github.com/rusqlite/rusqlite/issues/1633)
- Dedup free_boxed_value
[#&#8203;1635](https://redirect.github.com/rusqlite/rusqlite/issues/1635)
- Bump jiff version
[#&#8203;1645](https://redirect.github.com/rusqlite/rusqlite/issues/1645)
- Deserialize impls
[#&#8203;1646](https://redirect.github.com/rusqlite/rusqlite/issues/1646)
- Introduce BindIndex trait
[#&#8203;1649](https://redirect.github.com/rusqlite/rusqlite/issues/1649)
- Use BindIndex in bind_parameters_named
[#&#8203;1651](https://redirect.github.com/rusqlite/rusqlite/issues/1651)
- Improve flexibility of named params
[#&#8203;1652](https://redirect.github.com/rusqlite/rusqlite/issues/1652)
- Use std::ffi instead of std::os::raw
[#&#8203;1653](https://redirect.github.com/rusqlite/rusqlite/issues/1653)
- Bump bundled SQLite version to 3.49.1
[#&#8203;1654](https://redirect.github.com/rusqlite/rusqlite/issues/1654)
- update LICENSE
[#&#8203;1655](https://redirect.github.com/rusqlite/rusqlite/issues/1655)

**Full Changelog**:
https://github.com/rusqlite/rusqlite/compare/v0.33.0...v0.34.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 5am on the first day of the
month" (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 was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rust-lang/cargo).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
2025-04-01 14:27:07 +00:00
Ed Page
58efeda3bd
Prevent undeclared public network access (#15368)
Stop a few tests which aren't marked with `public_network_test` from
trying to access crates.io.
2025-04-01 14:24:54 +00:00
Sebastian Poeplau
aa1b353d64 Prevent undeclared public network access
Stop a few tests which aren't marked with `public_network_test` from
trying to access crates.io. While doing so, also make sure that other
`cargo_add` and `cargo_info` tests initialize the registry.
2025-04-01 11:41:30 +02:00
Weihang Lo
c5f58e97c9
rename the author field to be authors in book.toml (#15362)
See the [mdbook
documentation](https://rust-lang.github.io/mdBook/format/configuration/general.html)
Apparently the `author` was field was [incorrect
documentation](https://github.com/rust-lang/mdBook/issues/2623)
2025-04-01 05:04:04 +00:00
renovate[bot]
3a0bd02bb3
chore(deps): update rust crate rusqlite to 0.34.0 2025-04-01 00:23:40 +00:00
Ed Page
58bab51ca4
move modules from kebab-case to snake_case (#14439)
<!-- 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?

Explain the motivation behind this change.
A clear overview along with an in-depth explanation are helpful.

You can use `Fixes #<issue number>` to associate this PR to an existing
issue.

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

Demonstrate how you test this change and guide reviewers through your
PR.
With a smooth review process, a pull request usually gets reviewed
quicker.

If you don't know how to write and run your tests, please read the
guide:
https://doc.crates.io/contrib/tests

### Additional information

Other information you want to mention in this PR, such as prior arts,
future extensions, an unresolved problem, or a TODO list.
-->
<!-- homu-ignore:end -->

### What does this PR try to resolve?

It is currently unclear reading the docs how files should be named. [RFC
430](https://rust-lang.github.io/rfcs/0430-finalizing-naming-conventions.html)
is clear on crates and module names, `kebab-case` is never mentioned and
while there are historical considerations, we should guide new
development towards `snake_case`. We should align the documented
defaults to that RFC.

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

Review the docs and determine if we view value in the change.
2025-03-31 23:49:28 +00:00
Dominick Schroer
f8984e1169 docs(project-layout): add note on recommended target naming 2025-03-31 17:18:25 -06:00
Ed Page
949858cda0
chore: bump to 0.89.0; update changelog (#15372)
[rendered](https://github.com/weihanglo/cargo/blob/version-bump/src/doc/src/CHANGELOG.md)

or preview through `mdbook serve src/doc`
2025-03-31 22:50:54 +00:00
Weihang Lo
f2618f11de
docs: update changelog for 1.88.0 2025-03-31 15:05:17 -07:00
Weihang Lo
0df147419b
docs: update changelog for 1.87.0 2025-03-31 15:05:08 -07:00
Weihang Lo
bf43378697
chore: bump to 0.89.0 2025-03-31 10:52:24 -07:00
Ed Page
94bc054fcf
docs(unstable): update -Zrustdoc-depinfo tracking issue link (#15371)
Tracking issue: <https://github.com/rust-lang/cargo/issues/15370>
2025-03-31 17:48:38 +00:00
Weihang Lo
28f2cc5893
fix(tree): Make output more deterministic (#15369)
### What does this PR try to resolve?
When you have a dependency show up in multiple dependency tables, the
order they are processed was not deterministic. Its hard to predict the
exact effects this was having (e.g. for writing tests for this) but
changing this made #15366 not reproduce anymore for me.

I'm going to consier this as fixing #15366 mostly because how difficult
it is to debug with the non-determinism.
If someone can find a case where this fails, at least it should now
always fail and it should be easier to determine why.

Fixes #15366

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

### Additional information
2025-03-31 17:24:30 +00:00
Weihang Lo
a792237e89
docs(unstable): update -Zrustdoc-depinfo tracking issue link 2025-03-31 10:18:32 -07:00
Ed Page
138a20b1b1 fix(tree): Make output more deterministic
When you have a dependency show up in multiple dependency tables,
the order they are processed was not deterministic.
Its hard to predict the exact effects this was having (e.g. for writing
tests for this) but changing this made #15366 not reproduce anymore for me.

I'm going to consier this as fixing #15366 mostly because how difficult
it is to debug with the non-determinism.
If someone can find a case where this fails, at least it should now
always fail and it should be easier to determine why.

Fixes #15366
2025-03-31 11:30:54 -05:00
Eric Huss
659e27413c Stabilize automatic garbage collection. 2025-03-31 09:28:44 -07:00
Ed Page
7220445a9d
feat: rustdoc depinfo rebuild detection via -Zrustdoc-depinfo (#15359)
### What does this PR try to resolve?

This leverages the unstable `--emit=depinfo` option from rustdoc,
so that rustdoc invocation rebuild can be better tracked
without traversing the entire directory.

Some design decisions made in the current implementation:

* Rustdoc's depinfo doesn't and shouldn't emit to `target/doc`,
  as the directory is considered part of the final artifact directory.
  In regard to that, we specify the dep-info output path to
  the fingerprint directory of rustdoc invocation.
  It looks like this
  `target/debug/.fingerprint/serde-12d29d32b3b8b38f/doc-lib-serde.d`.
* We also start supporting `-Zchecksum-freshness` as a side effect.
  Could make it a separate PR if desired.
* `-Zbinary-dep-depinfo` is not enabled along with this,
  since doc generations don't really require any binary dependencies.

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

The tests added has covered these cases:

* target src outside package root, e.g., `lib.path = "../lib.rs"`
* `#[doc = include_str!("../outside/pkgroot")]`
* `#[path = "../outside/pkgroot"]`
* `env!`

### Additional information

Fixes #12266
Closes #15205
2025-03-31 14:12:26 +00:00
Weihang Lo
585f66a01d
Rename the gc config table (#15367)
This renames the gc config table to `[cache]` to help avoid some
confusion, and to set up a namespace for possible expansion in the
future for different kind of cache controls.

Low-level settings are stuffed into the `[cache.global-clean]` table,
but we do not expect to stabilize these at this time. Only the top-level
`cache.auto-clean-frequency` setting is expected to be stabilized.

Closes https://github.com/rust-lang/cargo/issues/14292
2025-03-30 16:29:47 +00:00
Eric Huss
efb3419d47 Rename the gc config table
This renames the gc config table to `[cache]` to help avoid some
confusion, and to set up a namespace for possible expansion in the
future for different kind of cache controls.

Low-level settings are stuffed into the `[cache.global-clean]` table,
but we do not expect to stabilize these at this time. Only the top-level
`cache.auto-clean-frequency` setting is expected to be stabilized.

Closes https://github.com/rust-lang/cargo/issues/14292
2025-03-30 04:45:07 -07:00
Weihang Lo
a18e60462e
feat(fingerprint): integrate rustdoc dep-info files
This leverages the unstable `--emit=depinfo` option from rustdoc,
so that rustdoc invocation rebuild can be better tracked
without traversing the entire directory.

Some design decisions:

* Rustdoc's depinfo doesn't and shouldn't emit to `target/doc`,
  as the directory is considered part of the final artifact directory.
  In regard to that, we specify the dep-info output path to
  the fingerprint directory of rustdoc invocation.
  It looks like this
  `target/debug/.fingerprint/serde-12d29d32b3b8b38f/doc-lib-serde.d`.
* We also start supporting `-Zchecksum-freshness` as a side effect.
  Could make it a separate PR if desired.
* `-Zbinary-dep-depinfo` is not enabled along with this,
  since doc generations don't really require any binary dependencies.
2025-03-28 22:07:30 -07:00
Gábor Szabó
840d63b574
rename the author field to be authors in book.toml 2025-03-28 17:26:28 +03:00
Weihang Lo
1f6d4be081
test(doc): show scenarios cargo doc not rebuild 2025-03-27 22:45:49 -07:00
Weihang Lo
80525dc48a
Revert "Temporarily ignore cargo_test_doctest_xcompile_ignores" (#15357)
This reverts https://github.com/rust-lang/cargo/pull/15348 now that
https://github.com/rust-lang/rust/pull/138877 is on nightly.
2025-03-28 02:00:17 +00:00
Eric Huss
bbce504bf3
Revert "Temporarily ignore cargo_test_doctest_xcompile_ignores" 2025-03-27 18:28:09 -07:00
Weihang Lo
3530a26e5a
docs(unstable): explain -Z rustdoc-depinfo 2025-03-27 12:22:27 -04:00
Weihang Lo
95dafab660
feat(unstable): add -Zrustdoc-depinfo flag 2025-03-27 11:55:55 -04:00
Weihang Lo
84a38b9376
Don't canonicalize executable path in cargo_exe (#15355)
### What does this PR try to resolve?

Follow up to #9991. The issue explains why but in short canonicalising
executable paths causes issues for symlinks. It seems this was missed in
#9991.

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

Note that the comment I deleted is wrong since #9991.

Running existing test should ensure this doesn't break anything.
2025-03-27 00:40:31 +00:00
Chris Denton
d82b596962
Don't canonicalize in cargo_exe 2025-03-26 23:47:08 +00:00
Ed Page
a6c604d1b8
fix(package): update tracking issue for --message-format (#15354)
Went ahead and created a new tracking issue
<https://github.com/rust-lang/cargo/issues/15353>.
2025-03-26 18:11:00 +00:00
Weihang Lo
a24066a79c
fix(package): update tracking issue for --message-format 2025-03-26 13:37:01 -04:00
Weihang Lo
280efd3dce
docs(contrib): Expand the description of team meetings (#15349)
### What does this PR try to resolve?

The goal is to make Cargo team meetings more inviting. This PR includes
both the information for more people to attend while framing the purpose
of the meeting to set appropriate expectations.

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

### Additional information
2025-03-26 16:53:06 +00:00
Ed Page
856f1bae5d
feat(package): add unstable --message-format flag (#15311)
### What does this PR try to resolve?

#11666

This adds an unstable `--message-format` flag to `cargo package` to help
`--list` output in newline-delimited JSON format.

See
<https://github.com/weihanglo/cargo/blob/package-list-fmt/src/doc/man/cargo-package.md#package-options>
for more on what is provided.

Open questions
- `--list json` or `--message-format json`, see
https://github.com/rust-lang/cargo/pull/15311#discussion_r1995637878
- a single json blob vs N? What is N? See
https://github.com/rust-lang/cargo/pull/15311#discussion_r1995641250
- Is the current format `plain` or `human`, see
https://github.com/rust-lang/cargo/pull/15311#discussion_r2012443601
- snake_case or kebab-case, see
https://github.com/rust-lang/cargo/pull/15311#discussion_r1995641593

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

* This currently outputs absolute paths.
  If we don't want to show absolute paths in the JSON output,
  could switch to relative path to either package root or cwd
  (I prefer the latter though).
* The actual schema, format option names, and field names is open to
discuss and change. See also
<https://github.com/rust-lang/cargo/issues/12377> for reference.
2025-03-26 16:32:05 +00:00
Ed Page
521bd7650c
feat(complete): Added completion for --profile (#15308)
### What does this PR try to resolve?

This attempts to complete the autocompleter for `cargo build --profile
<TAB>`, it loads the built in profiles and the custom profile present in
`Cargo.toml` and `.cargo/config.toml` if present when pressing TAB key,
in the completion value it also adds an description inspired by
[this](https://github.com/rust-lang/cargo/blob/master/src/cargo/core/compiler/job_queue/mod.rs#L805-L813)

![Screenshot from 2025-03-14
02-17-40](https://github.com/user-attachments/assets/6fc784a0-e3e7-4deb-9252-847d720894c1)

Related to #14520
2025-03-26 13:48:54 +00:00
utnim2
feb0e50b68 feat(complete): Added completion for --profile
- Added completion for `--profile` in `cargo build`
 - Loads the built in profile and custom profiles present in `Cargo.toml` and `.cargo/config.toml`
2025-03-26 12:31:44 +05:30