-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Implement a concrete test
ArgParser in dartdev
#42014
Comments
What is the use case that you are trying to support here? This package only intends to support pub style packages afaik. |
The message that 1 more thoughts:
|
Something else seems to be going on. As far as I know The main entrypoint for which we parse arguments and print usage is here. I would suggest playing around with the entrypoint to figure out what's going on. Does |
Thanks Gary, transferred it to area-dart-cli, I'll take a look. @jonasfj for the pub aspect |
Yeah, it runs |
@jwren are you fixing this? |
I don't understand well enough how |
By certain packages do you mean The test framework is versioned in the If there is no |
Unless we pin I suspect the best thing to do is to simply check if following conditions are satisfied:
If neither of these is the case, we instruct users to:
|
As for
|
I think there are two issues here:
|
We could fix this by adding an command/args parser for |
test
ArgParser in dartdev
Fundamentally, we can't do much about the fact that the initial run of
We're currently, looking into embedding |
Hey, a drive by comment on the above CL: I see that we're embedding the args parser from package:test in dartdev. That addresses the issue, but will mean that we (periodically? regularly?) get out of sync with the actual commands that package:test supports. I think the main issue is that we don't fail well when there's no pubspec;
We do handle the case where there is a pubspec, but the user does not yet have a dependency on package:test. We special case that, and print:
I think a viable alternative to duplicating the package:test args parser into dartdev is to improve the failure message for cases where there's no pubspec (and likely also, the case where there is a pubspec and a test dep, but the user has not yet run |
…to dartdev to have the `dart test --help` / `dart help test` command return faster and in a more robust manner. Bug: #42014 Change-Id: Icb088f9d4756c7673751ebf271575abf05660983 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158701 Reviewed-by: Ben Konyi <bkonyi@google.com> Commit-Queue: Jaime Wren <jwren@google.com>
As soon as we ship the first |
Unless we make bigger changes, we'll still be running We don't know what version of package:test the user's version solve will select. It's tough to know which version of the |
I'm indeed assuming we'll make bigger changes; actually bring the pub sources into |
I think for the |
@devoncarew I didn't see your message here until after I pushed the CL. The other issue that is solved is that Having to update the help text to keep it in sync seems to me a small cost for the benefit. |
@jwren, can this be closed? |
Yes, closing now. |
test only prints the help text if there is a
pubspec.yaml
file in the current working directory.The text was updated successfully, but these errors were encountered: