-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(z-flags): Verify -Z
flags list is sorted
#12224
Conversation
r? @weihanglo (rustbot has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. Feel free to r=weihanglo
when you manage to fix the error.
Just a drive-by comment, I haven't really been following the changes here. Something to consider would be something like this tidy test which the compiler uses to keep lists of things sorted by using special comments to mark what should be sorted. I'm not sure if that would help in this case, but something to consider. |
@bors try |
test(z-flags): Verify `-Z` flags list is sorted #12182 made it so that `unstable_cli_options!` was sorted, but had no way to make sure it would stay sorted in the future. In [this thread](https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Sorting.20features!.20and.20ensuring.20it.20stays.20sorted), I proposed that a test should be added that would fail if the list is not sorted, this PR adds that test. If the list is not sorted the test output looks like this: ![Screenshot from 2023-06-02 10-17-08](https://github.com/rust-lang/cargo/assets/23045215/f22cf5f3-4411-44ec-ac5a-991165d5e0a1)
This is definitely a good long-term solution. We do have some other places that are better to keep sorted, such as
|
@bors r+ |
☀️ Test successful - checks-actions |
Update cargo 11 commits in 49b6d9e179a91cf7645142541c9563443f64bf2b..0c14026aa84ee2ec4c67460c0a18abc8519ca6b2 2023-06-09 17:21:19 +0000 to 2023-06-14 18:43:05 +0000 - fix(embedded): Don't append hash to bin names (rust-lang/cargo#12269) - Fix version requirement example in Dependency Resolution, SemVer compatibility section (rust-lang/cargo#12267) - Update triagebot links. (rust-lang/cargo#12265) - Show a better error when container tests fail. (rust-lang/cargo#12264) - chore: update dependencies (rust-lang/cargo#12261) - refactor(embedded) (rust-lang/cargo#12262) - docs: clarify the use of `default` branch instead of `main` by default (rust-lang/cargo#12251) - docs: update changelog for 1.71 backport and 1.72 (rust-lang/cargo#12256) - feat: Initial support for single-file packages (rust-lang/cargo#12245) - test(z-flags): Verify `-Z` flags list is sorted (rust-lang/cargo#12224) - refactor: registry data kinds cleanup (rust-lang/cargo#12248) --- This commit also update LICENSE exceptions, as Cargo introduced a newer version of `dunce` and `blake3` as dependencies. r? `@ghost`
Update cargo 11 commits in 49b6d9e179a91cf7645142541c9563443f64bf2b..0c14026aa84ee2ec4c67460c0a18abc8519ca6b2 2023-06-09 17:21:19 +0000 to 2023-06-14 18:43:05 +0000 - fix(embedded): Don't append hash to bin names (rust-lang/cargo#12269) - Fix version requirement example in Dependency Resolution, SemVer compatibility section (rust-lang/cargo#12267) - Update triagebot links. (rust-lang/cargo#12265) - Show a better error when container tests fail. (rust-lang/cargo#12264) - chore: update dependencies (rust-lang/cargo#12261) - refactor(embedded) (rust-lang/cargo#12262) - docs: clarify the use of `default` branch instead of `main` by default (rust-lang/cargo#12251) - docs: update changelog for 1.71 backport and 1.72 (rust-lang/cargo#12256) - feat: Initial support for single-file packages (rust-lang/cargo#12245) - test(z-flags): Verify `-Z` flags list is sorted (rust-lang/cargo#12224) - refactor: registry data kinds cleanup (rust-lang/cargo#12248) --- This commit also update LICENSE exceptions, as Cargo introduced a newer version of `dunce` and `blake3` as dependencies. r? `@ghost`
This has been around since rust-lang#12224 and isn't in the RFC, so its being removed. This is part of rust-lang#12207.
This has been around since #12224 and isn't in the RFC, so its being removed. This is part of #12207. <!-- Thanks for submitting a pull request 🎉! Here are some tips for you: * If this is your first contribution, read "Cargo Contribution Guide" first: https://doc.crates.io/contrib/ * Run `cargo fmt --all` to format your code changes. * Small commits and pull requests are always preferable and easy to review. * If your idea is large and needs feedback from the community, read how: https://doc.crates.io/contrib/process/#working-on-large-features * Cargo takes care of compatibility. Read our design principles: https://doc.crates.io/contrib/design.html * When changing help text of cargo commands, follow the steps to generate docs: https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages * If your PR is not finished, set it as "draft" PR or add "WIP" in its title. * It's ok to use the CI resources to test your PR, but please don't abuse them. ### What does this PR try to resolve? Explain the motivation behind this change. A clear overview along with an in-depth explanation are helpful. You can use `Fixes #<issue number>` to associate this PR to an existing issue. ### How should we test and review this PR? Demonstrate how you test this change and guide reviewers through your PR. With a smooth review process, a pull request usually gets reviewed quicker. If you don't know how to write and run your tests, please read the guide: https://doc.crates.io/contrib/tests ### Additional information Other information you want to mention in this PR, such as prior arts, future extensions, an unresolved problem, or a TODO list. -->
#12182 made it so that
unstable_cli_options!
was sorted, but had no way to make sure it would stay sorted in the future.In this thread, I proposed that a test should be added that would fail if the list is not sorted, this PR adds that test.
If the list is not sorted the test output looks like this: