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

make tools command line arguments consistent #7489

Open
sigmundch opened this issue Dec 18, 2012 · 5 comments
Open

make tools command line arguments consistent #7489

sigmundch opened this issue Dec 18, 2012 · 5 comments
Labels
area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...). P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@sigmundch
Copy link
Member

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)

@iposva-google
Copy link
Contributor

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.

@anders-sandholm
Copy link
Contributor

Added Area-Tools label.

@anders-sandholm
Copy link
Contributor

Removed Area-Tools label.
Added Area-Pkg, Pkg-Args labels.

@munificent
Copy link
Member

* dart2js accepts passing options after the normal arguments (args requires that all options are passed upfront)

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.
Added Type-Meta label.
Marked this as being blocked by #11113, #19806.

@munificent
Copy link
Member

Removed Pkg-Args label.

@sigmundch sigmundch added area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...). Priority-Medium labels Jul 2, 2014
@nex3 nex3 added area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...). Type-Enhancement and removed area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...). labels Jul 6, 2015
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed triaged labels Feb 29, 2016
@munificent munificent added area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...). and removed area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...). area-multi labels Jun 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...). P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

7 participants