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
make tools command line arguments consistent #7489
Comments
Triaged with no specific Area for now. For the VM the only user accessible option that makes sense to follow the standardization is package-rot. We will wait to see how this plays out though. Added Triaged label. |
Added Area-Tools label. |
Removed Area-Tools label. |
Args supports both now using new ArgParser(allowTrailingOptions: true). I believe that means dart2js could use the args package now without loss of functionality (which would be great!), but there may be some corner cases I'm not aware of. The only thing in this bug I see for args to do is support "/" options on Windows. I'll file separate tracking bugs for that and the other stuff on here and turn this into a metabug. Removed Type-Defect, Area-Pkg labels. |
Removed Pkg-Args label. |
This was recently reported by a user of web_ui here: https://github.com/dart-lang/web-ui/issues/270
We have an 'args' package that we use in several tools and we have other ways to parse options in the dart vm, dart2js, and other internal tools. It will make everyone happy if we support the same set of features everywhere.
Here is where we are today:
* All 3 systems (vm, dart2js, args) accept arguments of this form:
--option=value
--flag
* dart2js and args accept abbreviations:
-f
-h
and they accept passing values to an abbreviation directly after it:
-ovalue
(Note that the vm accepts some abbreviations like -h and -v, but they are not documented when the usage is printed.)
* dart2js accepts some flags for windows:
/h /?
* 'args' accepts passing values after a space:
--option value (same as --option=value)
-o value (same as -ovalue in dart2js)
* 'args' accepts collapsing bool flags:
-fbv (same as -f -b -v)
* dart2js accepts passing options after the normal arguments (args requires that all options are passed upfront)
We probably want the union of all these options, which means:
* change args to support windows flags (maybe only for help?) and allowing options after the normal arguments
* change dart2js to allow spaces after options and maybe collapsing bool flags abbreviations
* improve the documentation of options in the vm and allow spaces after options with values (e.g. package-root).
(I'm not sure what area to use for this issue, I'm cc'ing some who I believe are interested in this issue, please add other relevant people that I missed)
The text was updated successfully, but these errors were encountered: