-
Notifications
You must be signed in to change notification settings - Fork 2.9k
cargo publish stripping hints section from Cargo.toml #15836
Copy link
Copy link
Open
Labels
A-documenting-cargo-itselfArea: Cargo's documentationArea: Cargo's documentationA-manifestArea: Cargo.toml issuesArea: Cargo.toml issuesC-bugCategory: bugCategory: bugCommand-packageS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Metadata
Metadata
Assignees
Labels
A-documenting-cargo-itselfArea: Cargo's documentationArea: Cargo's documentationA-manifestArea: Cargo.toml issuesArea: Cargo.toml issuesC-bugCategory: bugCategory: bugCommand-packageS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
We recently added
hints.mostly-unused = trueto several of the aws-sdk-rust crates to improve compilation time (ex: aws-sdk-ec2). A user reported that compiling with the new-Zprofile-hint-mostly-unusedoption did not improve their compilation times and that they did not see ahintssection when looking at the crate in the Cargo cache.When looking at the published source on docs.rs (which I assume is the same as that on crates.io?) I also do not see a
hintssection. Runningcargo publish --dry-runand looking at the generated package intarget/packageI can confirm that thehintssection is removed from the package by the publish command.Running
cargo +nightly publish --dry-rundoes include thehintssection in Cargo.tomlSteps
Possible Solution(s)
I suspect that
cargo publishis stripping out unrecognized sections in Cargo.toml, and we are not publishing with nightly and the-Zprofile-hint-mostly-unusedoption. This should likely be more permissive in allowing sections through.Notes
No response
Version