Skip to content

Conversation

@weihanglo
Copy link
Member

@weihanglo weihanglo commented Nov 25, 2025

What does this PR try to resolve?

Discussed in 2025-11-25 t-cargo meeting.
We prefer inline tables over array of tables for include.

  • include is special and should appear early in config files,
    before other configuration keys
  • Array-of-tables syntax allows interleaving with other config,
    which creates confusion about merge order and precedence
  • Inline tables keep all include declarations together at the top,
    making the load order behavior clearer

Part of #7723 and #16284

How to test and review this PR?

@weihanglo weihanglo added the Z-config-include Nightly: `include` config key label Nov 25, 2025
@rustbot rustbot added A-documenting-cargo-itself Area: Cargo's documentation S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 25, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 25, 2025

r? @epage

rustbot has assigned @epage.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Discussed in 2025-11-25 t-cargo meeting.
We prefer inline tables over array of tables for `include`.

* `include` is special and should appear early in config files,
  before other configuration keys
* Array-of-tables syntax allows interleaving with other config,
  which creates confusion about merge order and precedence
* Inline tables keep all `include` declarations together at the top,
  making the load order and override behavior clearer
This adds introductory section explaining purpose
as well as one placement note for stabilization
@weihanglo
Copy link
Member Author

Failed on Windows x86_64 gnu. Retrying.

https://github.com/rust-lang/cargo/actions/runs/19680860094/job/56374258421?pr=16301#step:15:4756

 ---- freshness::move_target_directory_with_path_deps stdout ----
running `D:\a\cargo\cargo\target\debug\cargo.exe build`

thread 'freshness::move_target_directory_with_path_deps' (8876) panicked at tests\testsuite\freshness.rs:2399:54:
called `Result::unwrap()` on an `Err` value: Os { code: 5, kind: PermissionDenied, message: "Access is denied." }


failures:
    freshness::move_target_directory_with_path_deps

test result: FAILED. 3846 passed; 1 failed; 49 ignored; 0 measured; 0 filtered out; finished in 625.53s

error: test failed, to rerun pass `-p cargo --test testsuite`

@epage epage added this pull request to the merge queue Nov 25, 2025
Merged via the queue into rust-lang:master with commit 2a7c496 Nov 25, 2025
45 of 52 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 25, 2025
@weihanglo weihanglo deleted the doc branch November 25, 2025 20:39
bors added a commit to rust-lang/rust that referenced this pull request Nov 26, 2025
Update cargo submodule

7 commits in 9fa462fe3a81e07e0bfdcc75c29d312c55113ebb..2a7c4960677971f88458b0f8b461a866836dff59
2025-11-21 20:49:51 +0000 to 2025-11-25 19:58:07 +0000
- docs(config-include): prepare for doc stabilization  (rust-lang/cargo#16301)
- fix(config-include): remove support of single string shorthand (rust-lang/cargo#16298)
- Revert "feat: Do not lock the artifact-dir for check builds" (rust-lang/cargo#16299)
- clean: Add --workspace support (rust-lang/cargo#16263)
- feat(tree): Add more native completions (rust-lang/cargo#16296)
- fix(package): exclude target/package from backups (rust-lang/cargo#16272)
- test: re-enable test since not flaky anymore (rust-lang/cargo#16287)
@rustbot rustbot added this to the 1.93.0 milestone Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-documenting-cargo-itself Area: Cargo's documentation Z-config-include Nightly: `include` config key

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants