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

Restrictions help hints not output in a deterministic order #50

Closed
rvesse opened this issue Sep 12, 2016 · 0 comments
Closed

Restrictions help hints not output in a deterministic order #50

rvesse opened this issue Sep 12, 2016 · 0 comments
Labels
bug Bug help Help System
Milestone

Comments

@rvesse
Copy link
Owner

rvesse commented Sep 12, 2016

Noticed this in our internal use of airline

Where a option/argument has multiple restrictions apply to it and these all provide help hints the order in which these hints get included in the help output is nondeterministic.

This means that generating the help multiple times can produce slightly different output each time. In order to avoid this we should ensure that the processing of help hints enforces a deterministic order e.g. Based upon the class of restriction

@rvesse rvesse added the bug Bug label Sep 12, 2016
@rvesse rvesse added this to the 2.2.0 milestone Sep 12, 2016
@rvesse rvesse added the help Help System label Sep 13, 2016
rvesse added a commit that referenced this issue Sep 20, 2016
Adds a new Comparator<? super HelpHint> to various usage generators
which is used to sort help hints in a deterministic manner with a
provided default implementation for when not explicitly specified.
rvesse added a commit that referenced this issue Sep 20, 2016
Uses the hint comparisons added in the previous commit to achieve the
same effect
@rvesse rvesse closed this as completed in 48343b2 Sep 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug help Help System
Projects
None yet
Development

No branches or pull requests

1 participant