cargo icon indicating copy to clipboard operation
cargo copied to clipboard

Case insensitive file name matching when packaging files

Open torhovland opened this issue 1 year ago • 4 comments

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

torhovland avatar May 08 '24 13:05 torhovland

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

rustbot avatar May 08 '24 13:05 rustbot

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.

epage avatar May 08 '24 13:05 epage

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.

torhovland avatar May 09 '24 09:05 torhovland

Thanks for the PR. Marked it as draft for now to reflect the fact that it's still in discussion.

weihanglo avatar May 09 '24 15:05 weihanglo

:umbrella: The latest upstream changes (presumably #14004) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Jun 03 '24 22:06 bors

:umbrella: The latest upstream changes (possibly 081d7bac633bbc72883fb74fb4993bb1b1a2df4a) made this pull request unmergeable. Please resolve the merge conflicts.

rustbot avatar Dec 20 '24 15:12 rustbot