fix: stabilize -Zrustdoc-depinfo#17020
Conversation
|
r? @epage rustbot has assigned @epage. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
Oops. This is not going to work without flagging every cargo doc test case nightly-only 🥲 |
c5f28e7 to
0cc616a
Compare
0cc616a to
94cc4e0
Compare
This comment has been minimized.
This comment has been minimized.
1180628 to
e143eee
Compare
This comment has been minimized.
This comment has been minimized.
76c6730 to
b76bf7e
Compare
This comment was marked as duplicate.
This comment was marked as duplicate.
|
@rfcbot fcp merge T-cargo |
|
@weihanglo has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
b76bf7e to
063ce16
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
063ce16 to
7e7f37a
Compare
This comment has been minimized.
This comment has been minimized.
7e7f37a to
5c201d1
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5c201d1 to
09a03c1
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
With this stabilization, `cargo doc` unconditionally emits rustdoc depinfo via `rustdoc --emit=dep-info`. Before this, `cargo doc` used to track file changes via filesystem traversal. The depinfo files are emitted to Cargo's fingerprint which is a private location so we don't have to commit any stability around it if we want to move it somewhere else in future versions. Note that `rustdoc --output-format json` still use the old package fingerprint because `--output-format json` is not yet compatible and controllable through `--emit`.
09a03c1 to
bed8e31
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
---> FCP <---
What does this PR try to resolve?
With this stabilization,
cargo docunconditionally emits rustdoc depinfovia
rustdoc --emit=dep-info.Before this,
cargo docused to track file changes via filesystem traversal just like build scripts, and it cannot detect these cases:lib.path = "../lib.rs"include_str!to include files outisde pakcage root, e.g.,#[doc = include_str!("../outside/pkgroot")]#[path = "../outside/pkgroot"]env!in doc attribute, e.g.,#[doc = env!("…")]The depinfo files are emitted to Cargo's fingerprint which is a private location so we don't have to commit any stability around it if we want to move it somewhere else in future versions.
Fixes #15370
How to test and review this PR?
While this is a bugfix, I assume we still need an FCP for it.