-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #12399 - epage:normalize, r=weihanglo
fix(package): Recognize and normalize `cargo.toml` ### What does this PR try to resolve? This solution is a blend of conservative and easy - Normalizes `cargo.toml` to `Cargo.toml` on publish - Ensuring we publish the `prepare_for_publish` version and include `Cargo.toml.orig` - Avoids dealing with trying to push existing users to `Cargo.toml` - All other cases of `Cargo.toml` are warnings - We could either normalize or turn this into an error in the future - When helping users with case previously, we've only handle the `cargo.toml` case - We already should have a fallback in case a manifest isn't detected - I didn't want to put in too much effort to make the code more complicated to handle this As a side effect, if a Linux user has `cargo.toml` and `Cargo.toml`, we'll only put one of them in the `.crate` file. We can extend this out to also include a warning for portability for case insensitive filesystems but I left that for after #12235. ### How should we test and review this PR? A PR at a time will show how the behavior changed as the source was edited This does add a direct dependency on `unicase` to help keep case-insensitive comparisons easy / clear and to avoid riskier areas for bugs like writing an appropriate `Hash` implementation. `unicase` is an existing transitive dependency of cargo. ### Additional information Fixes #12384 [Discussion on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/.60cargo.2Etoml.60.20on.20case.20insensitive.20filesystems)
- Loading branch information
Showing
4 changed files
with
180 additions
and
38 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters