-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
No way to get help for pub subcommands with dart pub
#42965
Comments
|
Note that this does work:
|
This is caused by the argument parsers for some older commands (like pub) being shallow wrappers in dart CLI that call out to the existing commands. Over time as we discontinue the older commands, we can move all of the command and argument parsing into the dart CLI. Also, you can use |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I believe a solution for this would be to do some light parsing of the command line for the
(which currently fails), to:
which will succeed. We'd need to be careful with that parsing and re-writing to ensure that we're correct in various cases; hopefully we can cover that w/ good unit tests. I don't think this is critical for this milestone however; it's currently a P2 - we may consider moving it out of the milestone as we get closer to the release. |
@devoncarew -- yes, thank you for articulating on the bug. I am working on this issue now. With the exception of a Dart VM issue, this is the last dart-cli bug labeled with the September milestone. |
A call to To re-order the commands, we'd have to intercept modify the Unfortunately, with the architecture of the args package the most robust way to implement this would be to copy the |
Yes, I think the CommandRunner doesn't support re-writing / re-parsing args. Its a specialized use case (but important when you need it). Have you considered doing the re-write before we pass the list of args to CommandRunner.run()? That would be on or around https://github.com/dart-lang/sdk/blob/master/pkg/dartdev/lib/dartdev.dart#L122. This is were things get tricky - you have to be careful about how you identify something like |
We have work ongoing in dart-lang/pub#2622 to facilitate embedding |
PR out at https://dart-review.googlesource.com/c/sdk/+/159341. @jonasfj - if/when embedding is done of |
Bug: #42965 Change-Id: Id2446b88fb983607f841c2fda81434087dc71d62 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159341 Commit-Queue: Jaime Wren <jwren@google.com> Reviewed-by: Devon Carew <devoncarew@google.com>
Pub has many sub-commands. Getting help for this is a fairly common use case. However.
dart help pub publish
fails:Note that this does seem to work for other commands, e.g.
compile
:The text was updated successfully, but these errors were encountered: