Skip to content
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

Sort list of available modules in verify-module error #755

Merged
merged 3 commits into from
Aug 16, 2023

Conversation

jonhnet
Copy link
Collaborator

@jonhnet jonhnet commented Aug 16, 2023

I've had the experience that when I mistype an argument to --verify-module, I scan the list, don't see the expected module, and become irrationally furious. Sorting the list makes it easier to understand what's available.

@jonhnet jonhnet requested a review from utaal August 16, 2023 18:51
.collect::<Vec<_>>()
.join("\n");
.collect::<Vec<_>>();
lines.sort(); // Present the available modules in sorted order
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this would sort the two header lines too:

format!("could not find module {mod_name} specified by --verify-module"),
format!("available modules are:"),

and the footer line

format!("or use --verify-root, --verify-pervasive")

We should just sort the module lines.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ha ha aaaawkward. Fixed.

@jonhnet jonhnet requested a review from utaal August 16, 2023 20:41
@utaal
Copy link
Collaborator

utaal commented Aug 16, 2023

Please squash when merging.

@jonhnet jonhnet merged commit b2b4abe into main Aug 16, 2023
4 checks passed
@jonhnet jonhnet deleted the jonh-sort-verify-modules-list branch August 16, 2023 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants