]> git.proxmox.com Git - cargo.git/commit
Auto merge of #10548 - Muscraft:rfc2906-part4, r=epage
authorbors <bors@rust-lang.org>
Fri, 8 Apr 2022 21:08:19 +0000 (21:08 +0000)
committerbors <bors@rust-lang.org>
Fri, 8 Apr 2022 21:08:19 +0000 (21:08 +0000)
commitfc5035d6980701c71c2ce3714e3ff239b19013b2
treed818b803980b5df4d03e1116ad37150bb8f30a12
parentb36cc6ed419e809774e6e051dc340473c67a5cbb
parent3bbb781ae7bf90f9d9254737bf9f0c8d93f67cec
Auto merge of #10548 - Muscraft:rfc2906-part4, r=epage

Part 4 of RFC2906 - Add support for inheriting `readme`

Tracking issue: #8415
RFC: rust-lang/rfcs#2906

[Part 1](https://github.com/rust-lang/cargo/pull/10497)
[Part 2](https://github.com/rust-lang/cargo/pull/10517)
[Part 3](https://github.com/rust-lang/cargo/pull/10538)

This PR focuses on adding support for inheriting `readme`:
- Added adjusting of a `readme` path when it is outside of the `package_root`
  - Copied from `license-file`'s implementation in `toml::prepare_for_publish()`
- Added copying of a `readme` file when it is outside of the `package_root` for publishing
  - Copied from `license-file`'s implementation in `cargo_package::build_ar_list()`
- Merged copying of a file outside of a `package_root` to reduce duplicated code and allow for other files in the future to be copied in a similar way

Remaining implementation work for the RFC
- Path dependencies infer version directive
- Lock workspace dependencies and warn when unused
- Optimizations, as needed
- Evaluate any new fields for being inheritable (e.g. `rust-version`)