Cargo.toml source rendered by docs.rs is inconsistent with Cargo.toml published by Cargo #2655
Labels
A-builds
Area: Building the documentation for a crate
E-medium
Effort: This requires a fair amount of work
S-needs-design
Status: There's a problem here, but no obvious solution; or the solution raises other questions
I noticed that the source code rendered by docs.rs at
https://docs.rs/crate/${name}/${version}/source/Cargo.toml
is different from the Cargo.toml actually in the published archive, athttps://static.crates.io/crates/${name}/${version}/download
. (Note: this is not a confusion between Cargo.toml vs Cargo.toml.orig.)From skimming the code in this repo, I did not come across what is causing the contents to get mangled, so I have opened this issue to verify whether this is intentional. Naively I would expect docs.rs's
source
pages to be serving exactly the contents that are in the published archives.Example
https://docs.rs/crate/unicode-ident/1.0.13/source/Cargo.toml currently shows this content:
However, according to
curl --silent https://static.crates.io/crates/unicode-ident/1.0.13/download | tar xzO unicode-ident-1.0.13/Cargo.toml
the crate contains the following different content instead. This would also be the same content found in$CARGO_HOME/registry/src/index.crates.io-6f17d22bba15001f/unicode-ident-1.0.13/Cargo.toml
.The TOML data structure is the same but docs.rs has seemingly alphabetized the content, and also stripped the comment block that had been inserted by Cargo.
The text was updated successfully, but these errors were encountered: