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

Placement of --verbose should not matter #535

Open
expede opened this issue Jun 28, 2021 · 1 comment
Open

Placement of --verbose should not matter #535

expede opened this issue Jun 28, 2021 · 1 comment
Labels
🐛 bug Something isn't working

Comments

@expede
Copy link
Member

expede commented Jun 28, 2021

Reported by @bmann

Summary

Problem

The placemant of --verbose matters to the parser, which is confusing:

These are okay:

fission up --watch 
fission up --verbose

fission up --watch --verbose
fission --verbose up --watch 

This fails and shows the help text:

❯ fission up --verbose --watch
Invalid option `--watch'

Note that in all of the successful cases, these are grouped: up --watch, which is likely the subparser trying to find relevant items in a span?

Impact

It can be confusing/frustrating for users to need to group flags in a particular way. They don't know how the parser is organized!

Solution

See if we can get the parser to be more lenient with flags, or switch back to subtyping (with lenses) verbose on all parsers. We used to have it all lense-y, but it seemed that a lot of extra boilerplate versus treating it as a separate entity in the top-level parser.

@expede expede added the 🐛 bug Something isn't working label Jun 28, 2021
@expede expede changed the title Order of --verbose matters Order of --verbose should not Jun 28, 2021
@expede expede changed the title Order of --verbose should not Placement of --verbose should not matter Jun 28, 2021
@expede
Copy link
Member Author

expede commented Jun 28, 2021

Also worth noting that --verbose order is reflected in the help text:

Usage: fission (SHORTCUT | COMMAND | --version) [-v|--verbose]

...and order does matter with nesting, such as this also failing command:

fission app --watch publish

Which I would actually not be surprised if it failed (which is does, but it also reads weird). The odd feeling thing about the --verbose case is that it feels like just another modifier, so it is surprising when this happens by simply swapping position with --watch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant