-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Preserve feature metadata in packaged Cargo.toml #17472
Copy link
Copy link
Open
Labels
A-featuresArea: features — conditional compilationArea: features — conditional compilationC-bugCategory: bugCategory: bugS-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.Z-feature-metadataNightly: feature-metadataNightly: feature-metadata
Description
Activity
Metadata
Metadata
Assignees
Labels
A-featuresArea: features — conditional compilationArea: features — conditional compilationC-bugCategory: bugCategory: bugS-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.Z-feature-metadataNightly: feature-metadataNightly: feature-metadata
Problem
The implementation of feature metadata in #15056 currently normalizes the metadata table to an array of enabled features, which is a lossy normoralization.
cargo infoandcargo metadatacannot retrieve the information for registry dependencies.package.rust-versionmay drift from registry dependencies and the git repo if people want to patch. The latter will require higher MSRV supporting the new syntax.See #14157 (comment)
Steps
No response
Possible Solution(s)
The published manifest generated by
cargo package/cargo publishshould contain whatever new metadata fields written in the originalCargo.toml. We may want to additionally check whetherpackage.rust-versionis compatible if those fields are present.Notes
No response
Version