Case insensitive file name matching when packaging files
Fixes #13722.
Handles the readme and license files. The Cargo.lock file is trickier. There are a bunch of places in the code where the existence of Cargo.lock (case sensitive) is checked, including when packaging.
I think it should be OK to keep Cargo.lock out of this. While the readme and license files are typically created by the user, the Cargo.lock file is typically created by Cargo, hence casing should be consistent anyway.
This PR also doesn't handle a TARGET dir. I can look into that if desired.
https://github.com/rust-lang/cargo/issues/13722#issuecomment-2041647811
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @epage (or someone else) some time within the next two weeks.
Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:
-
@rustbot author: the review is finished, PR author should check the comments and take action accordingly -
@rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue
Note that #13722 is not marked as S-Accepted. I don't think we've come to a conclusion on if it should be fixed and what the right constraints are.
I am now noticing that Cargo uses the unicase crate for case insensitive comparisons elsewhere.
use unicase::Ascii as UncasedAscii;
This PR should do that rather than explicitly converting to lowercase and comparing.
Thanks for the PR. Marked it as draft for now to reflect the fact that it's still in discussion.
:umbrella: The latest upstream changes (presumably #14004) made this pull request unmergeable. Please resolve the merge conflicts.
:umbrella: The latest upstream changes (possibly 081d7bac633bbc72883fb74fb4993bb1b1a2df4a) made this pull request unmergeable. Please resolve the merge conflicts.