Commit Graph

49 Commits

Author SHA1 Message Date
Michael Thomsen b54a95b0bb Add a new dartdev compile verb.
Supports compiling to snapshots, JS, native executables, and kernel:

$ dart help compile
Compile Dart to various formats

Usage: dart compile <subcommand> [arguments]
-h, --help    Print this usage information.

Available subcommands:
  aot      Compile Dart to an AOT snapshot
  exe      Compile Dart to a self-contained executable
  jit      Compile Dart to a JIT snapshot
  js       Compile Dart to JavaScript
  kernel   Compile Dart to Kernel intermediate format

Change-Id: I1143f8dd0eec6f87a8271144f92dedc1fcf82923
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146806
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-06-23 08:33:17 +00:00
Kevin Moore fcb6ba0d96 enable more lints for dartdev
Change-Id: Id3a0145076a671c830785b6344035726593e1492
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151940
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-06-22 17:06:16 +00:00
Kevin Moore 762113758d Enable v1.9 pedantic lints...
...except for `omit_local_variable_types`

Change-Id: Ifd9ac78fedf99786a07b2cee5a3891378a49ef5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151885
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-06-20 14:31:09 +00:00
Jaime Wren 1427fadf03 Initial analytics for the dartdev cli tool
From the original upload, this change has been updated to include:
- a new flag to disable analytics when running dartdev tests
- some tests on the analytics.dart utility methods
- logic for recording flags and options on dartdev cli calls
- message printed when the user runs the sub command `dart disable-analytics`
- a valid tracking ID

Change-Id: Ifeb4d0669b9fc53b62fea88285e5ac78cc8e14a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147823
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-06-09 18:33:53 +00:00
Sam Rawlins 2eaac80e1a dartdev: skip 'pub outdated' check in tests
Fixes https://github.com/dart-lang/sdk/issues/42049

We should enable, and test this feature in these tests, I think.
But for now I just need the tests to start passing. I haven't wrapped
my head around how mock-y / end-to-end-y migrate_test is.

Change-Id: I7a2e2034b2a1f42b71d78f4776ee8711071f01f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149200
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-05-28 04:50:24 +00:00
Jaime Wren 4218a7fdb6 When dart run is executed, look for file matching the pattern foo/bin/foo.dart or foo/bin/main.dart to execute
Change-Id: If05f11b0d043e1a21d50ffb8fd11a9b3316a243c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145703
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-05-20 19:17:50 +00:00
Paul Berry b45b32e839 Migration: remove _nnbdIsEnabled flag from migration unit test.
This flag was needed back when we had a forked SDK, to handle the fact
that the migration tool had different expected behaviors depending on
whether it was run against a pre-NNBD or a post-NNBD SDK.  Now that
the post-NNBD SDK has landed, we don't need it anymore.

Change-Id: Ia420fbf0d266a32e4c3030a2b8d0e712ee12eecf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148514
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-05-19 18:09:54 +00:00
Paul Berry d00d800f3a Migration: connect dartdev to new command-line API.
We no longer use the analysis server or dartfix for migration.

This should unblock removing migration integration from dartfix, which
will unblock publishing dartfix.

It should also pave the way for future changes that will allow us to
publish the NNBD migration tool on pub, which in turn will allow us to
provide updates and bug fixes to the migration tool without having to
publish a new Dart or Flutter SDK.

Change-Id: I9f128b61a2983befc5ef686867dab3db87fd6855
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148020
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-05-14 18:03:21 +00:00
asiva 03ce33f80c [BUILD] - Initial CL to unfork the NNBD Dart SDK
- Flips the flag from --nnbd to --no-nnbd so that by default it builds
  the NNBD version
- using the --no-nnbd flag results in the SDK being built in a
  directory which has the 'Legacy' suffix added to it
  (e.g: out/DebugX64Legacy)
- the '--enable-experiment=non-nullable' flag still needs to be passed
  in during execution so that CFE runs in that mode. This is different
  from the 'null_safety' flag

Change-Id: I729630a7bd36ea7ae38134f9285b44e93c283c68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138902
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-05-07 21:12:47 +00:00
Jaime Wren 7d87d3baa4 Dartdev - have the migrate command appear under dart help, without the --verbose flag
Change-Id: I69b1ca05d133fb0ba23306bd1058bbdb02a88b93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146441
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-05-05 17:33:12 +00:00
Siva Annamalai 726d3c7725 Revert "[BUILD] - Initial CL to unfork the NNBD Dart SDK"
This reverts commit cab69e7706.

Reason for revert: It was a temporary submit

Original change's description:
> [BUILD] - Initial CL to unfork the NNBD Dart SDK
> NOTE: This is a trial submit and will be reverted immediately.
> 
> - Flips the flag from --nnbd to --no-nnbd so that by default it builds
>   the NNBD version
> - using the --no-nnbd flag results in the SDK being built in a
>   directory which has the 'Legacy' suffix added to it
>   (e.g: out/DebugX64Legacy)
> - the '--enable-experiment=non-nullable' flag still needs to be passed
>   in during execution so that CFE runs in that mode. This is different
>   from the 'null_safety' flag
> 
> Change-Id: I7d25d9710818af5919c0bb83abe51153172f5886
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144880
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=asiva@google.com

Change-Id: Ib0f99fc1a42c9c7a8b21f8542f4a35dba9105d5c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144900
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-04-27 05:00:10 +00:00
asiva cab69e7706 [BUILD] - Initial CL to unfork the NNBD Dart SDK
NOTE: This is a trial submit and will be reverted immediately.

- Flips the flag from --nnbd to --no-nnbd so that by default it builds
  the NNBD version
- using the --no-nnbd flag results in the SDK being built in a
  directory which has the 'Legacy' suffix added to it
  (e.g: out/DebugX64Legacy)
- the '--enable-experiment=non-nullable' flag still needs to be passed
  in during execution so that CFE runs in that mode. This is different
  from the 'null_safety' flag

Change-Id: I7d25d9710818af5919c0bb83abe51153172f5886
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144880
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-04-27 04:59:26 +00:00
Jaime Wren e6862afcb8 dartdev help now shows common VM flags
Bug: https://github.com/dart-lang/sdk/issues/40953
Change-Id: I80ab478c0165dcb25eac37c34ad2b206a3dd9896
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141920
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-04-20 18:31:02 +00:00
Siva Annamalai 63a92a3b00 Revert "This is a trial submit of the unfork CL, it will be reverted immediately."
This reverts commit 393468dc89.

Reason for revert: This was a trial submit and so reverting it.

Original change's description:
> This is a trial submit of the unfork CL, it will be reverted immediately.
> This commit is being done so we can roll it into Flutter and run some device lab testing to see the effect this CL will have on Flutter.
> 
> [BUILD] - Initial CL to unfork the NNBD Dart SDK
> 
> - Flips the flag from --nnbd to --no-nnbd so that by default it builds
>   the NNBD version
> - using the --no-nnbd flag results in the SDK being built in a
>   directory which has the 'Legacy' suffix added to it
>   (e.g: out/DebugX64Legacy)
> - the '--enable-experiment=non-nullable' flag still needs to be passed
>   in during execution so that CFE runs in that mode. This is different
>   from the 'null_safety' flag
> 
> Change-Id: I83c813aee2a5b61ad876d8a7b0988705bb24c839
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144082
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=asiva@google.com,liama@google.com

Change-Id: I7b50fae71764eceb17893338d1981e40ea2de520
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144083
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-04-20 03:50:49 +00:00
asiva 393468dc89 This is a trial submit of the unfork CL, it will be reverted immediately.
This commit is being done so we can roll it into Flutter and run some device lab testing to see the effect this CL will have on Flutter.

[BUILD] - Initial CL to unfork the NNBD Dart SDK

- Flips the flag from --nnbd to --no-nnbd so that by default it builds
  the NNBD version
- using the --no-nnbd flag results in the SDK being built in a
  directory which has the 'Legacy' suffix added to it
  (e.g: out/DebugX64Legacy)
- the '--enable-experiment=non-nullable' flag still needs to be passed
  in during execution so that CFE runs in that mode. This is different
  from the 'null_safety' flag

Change-Id: I83c813aee2a5b61ad876d8a7b0988705bb24c839
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144082
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-04-20 03:46:06 +00:00
Jaime Wren 5bf1223ea9 Set a longer default timeout for dartdev.dart tests so flakiness is removed from the bots. Reason in utils.dart:
/// A long [Timeout] is provided for tests that start a process on
/// `bin/dartdev.dart` as the command is not compiled ahead of time, and each
/// invocation requires the VM to compile the entire dependency graph.

Change-Id: Ieec2238b5fb7358af5e9924912eaf2580d5dbfb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143181
Commit-Queue: Siva Annamalai <asiva@google.com>
Auto-Submit: Jaime Wren <jwren@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-04-14 04:19:29 +00:00
Paul Berry 021fa0fbd4 Migration: warn if the input code has unresolved imports.
The most likely cause is that the user has forgotten to run "pub get",
so we suggest that as a possible fix.

Fixes #40824.

Change-Id: I9c627017af08f9a851cadb46be8d9bf90a64ce78
Bug: https://github.com/dart-lang/sdk/issues/40824
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141823
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-03-31 22:04:46 +00:00
Paul Berry 322280e6a8 Sort declarations in pkg/dartdev/test/commands/migrate_test.dart
Change-Id: I1edd2837d6e3040acf288641a4dc5a5ff4026aac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141851
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-03-31 22:04:46 +00:00
Jaime Wren 04d4fafbdf Fix the dart help test output by implementing printUsage() in the test command
Bug: https://github.com/dart-lang/sdk/issues/41041
Change-Id: If9c34d9b86ee729797bef9430d0fb92bf9f2bbf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141220
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-03-30 19:08:18 +00:00
Devon Carew 0a95bacb4f [dartdev] test the dartdev analyze --fatal-warnings option
Change-Id: I4c2c370777deb7e47a446b6cf1e74b82bf8ee028
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141472
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-03-30 04:22:14 +00:00
Jaime Wren 0ea3ae6282 Initial dart run * support and files. I will follow up with additional tests and pubspec executable support.
Change-Id: I5679429218a77f1de5d49caacc1a60d7a55b2dcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140700
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-03-25 20:14:06 +00:00
Jaime Wren c6dd41bfb3 Add tests to dartdev that assert that all found usageLineLengths are the same and null
Change-Id: Ia20fca45eb5ace79751bc1060ec5e1ebf10212ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140802
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-03-24 21:53:19 +00:00
Devon Carew a58adbc7ea Revert "Use the 'any' constraint for the recommended dep on package:test."
This reverts commit c27af75504.

Reason for revert: There's not consensus on the `^1.0.0` vs. `any` constraint on package:test; see https://github.com/dart-lang/stagehand/pull/657 for the conversation. I'm reverting this change for now so that stagehand and dartdev are in agreement. We can update them both if we decide that `any` is a better constraint to recommand.

Original change's description:
> Use the 'any' constraint for the recommended dep on package:test.
> 
> Change-Id: I4052cf0653d827795e120b9b2beecc285935973a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139680
> Reviewed-by: Gary Roumanis <grouma@google.com>
> Reviewed-by: Jaime Wren <jwren@google.com>
> Reviewed-by: Michael Thomsen <mit@google.com>
> Commit-Queue: Devon Carew <devoncarew@google.com>

TBR=mit@google.com,devoncarew@google.com,jwren@google.com,grouma@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I60c09b399530f4860f59bd31535d29ca3adb70f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140764
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-03-24 15:21:13 +00:00
Jaime Wren a24c602135 Add some additional tests to test the commands that are currently passing the help <verb> == <verb> --help assertion.
Bug: https://github.com/dart-lang/sdk/issues/41041
Change-Id: I440c76fc84d0d222d8d996c622c711c31b13e948
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140144
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-03-20 17:40:22 +00:00
Jaime Wren 784b17dd24 Fix the output when running dart help pub.  Process.runSync(..) is used since printUsage() is not an async method.
Bug: https://github.com/dart-lang/sdk/issues/41040
Change-Id: I9e4fbab333bbd67dcab2b1e0752fc0debb80be46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139833
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-03-18 18:05:26 +00:00
Janice Collins 34fee361b6 Add sanity checks for NNBD state in migration.
Also adds some ability for the migration tool to abort itself on
a few known-fatal errors and armor-plates dartdev tests against
CWD problems.

Bug: https://github.com/dart-lang/sdk/issues/40329
Change-Id: I1cfa2c9dcc7815eed075ecb38c63a74c75889002
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139282
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2020-03-16 18:27:58 +00:00
Devon Carew c27af75504 Use the 'any' constraint for the recommended dep on package:test.
Change-Id: I4052cf0653d827795e120b9b2beecc285935973a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139680
Reviewed-by: Gary Roumanis <grouma@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-03-16 16:56:18 +00:00
Devon Carew 41cb842cb2 [dartdev] address a few analysis issues
Change-Id: I546a88aeed31a3e7349a45825087e3bed4720559
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138913
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-03-10 20:07:51 +00:00
Jaime Wren ba6087f40a Override and allow the hidden option to be set on MigrateCommand
`hidden` is implemented in the same manner that we do for flutter daemon, see https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/commands/daemon.dart#L49

Change-Id: I6dcb4a4f5e1a71ba7e90956cd15b4b95524dd2bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138106
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-03-03 19:47:54 +00:00
Jaime Wren 2d2e2f7c75 Allow dartdev to be executed from some ./dart-sdk/sdk/out/ReleaseX64/dart dart executable
Bug: https://github.com/dart-lang/sdk/issues/40808
Change-Id: I216aaf7637f3fb17c06c6118ee097c4c15076797
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137846
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-03-03 19:23:24 +00:00
Devon Carew 1fe6ca96d0 [dartdev] add a 'test' command
Change-Id: I5f1b509bb7dcc2f415656ed06afe14f2274ea358
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138061
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-03-03 00:06:26 +00:00
Devon Carew 353b04f96e [dartdev] add tests and remove dead code
Change-Id: I0e3ff1b9e507c48251d1b3588c86365052996d72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138020
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-03-02 20:22:52 +00:00
Devon Carew 8e3850395a [dartdev] refactor the dartdev pub command - delegate to the pub snapshot
Change-Id: If0221ba6472271a186fc8628416ddca73e951a80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137653
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-02-28 23:22:30 +00:00
Devon Carew 8b02263198 [dartdev] add a dartfix migrate command
Change-Id: Icb5de208e193f4003312dd849e34217ed53ca00f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136361
Reviewed-by: Janice Collins <jcollins@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-02-26 19:30:13 +00:00
Jaime Wren 4b8af9d734 Additional flags on the dartdev analyze command: --fatal-warnings and --fatal-infos
Change-Id: Id11ac9e924ef5fab61961cbf1c9d293b62e954e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137141
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-02-25 21:57:46 +00:00
Devon Carew d2c9f906e8 [dartdev] show progress while the dart analyze command is running
Change-Id: If10a921bb25c0e87ae32ff35cfdcd21e124bbd0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137000
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-02-24 22:11:29 +00:00
Jaime Wren fc6ace52c7 dartdev nits- test name and usage of ??
Change-Id: If789777f4e9022a5eafe6214624bc7c6c2726e36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136812
Auto-Submit: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-02-24 19:02:46 +00:00
Jaime Wren 754972096f Add a test to dartdev which asserts that all the command descriptions end with a period.
Change-Id: I3676e393b341afbdf78cde2af2133177de11b1a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136711
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-02-21 19:45:31 +00:00
Jaime Wren d986ab830e Initial implementation in dartdev for the 'analyze' verb. This 'dart analyze .' carries over functionality from 'flutter analyze .', but with minimal flags (as a starting point).
Change-Id: I4a9e2210b2b9923ffd7b33073a7b0ea7946f1438
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136520
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-02-21 07:44:46 +00:00
Devon Carew 66353dc196 [dartdev] tweak the help text for the pub and format commands
Change-Id: Id7b24e5866acf04b93973fc08d76dc93722a3173
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136321
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-02-20 19:16:52 +00:00
Jaime Wren f4bec13a15 Dartdev help output change, change the help output to be 'dart' instead of 'dartdev' in anticipation of having the Dart VM delegate to dartdev for supported commands
Change-Id: I2ff421bc08c825b16a40648b84e165e4d6f55d01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135941
Auto-Submit: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-02-14 17:29:02 +00:00
Jaime Wren 01e079eff1 The initial dartdev pub * command - pass on all arguments from the 'dartdev pub *' invocation directly to 'pub *'.
Change-Id: Ife14cfad7634c03c41b19db68f2cb6c4b26be0cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134600
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-02-13 20:43:38 +00:00
Jaime Wren e525e42267 Initial working 'dartdev format *' tool with the set of args and flags to match the 'flutter format *' tool
Change-Id: I292a85cf7b10a725f82a7a86d90aada4972b7c38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134566
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-02-06 00:09:19 +00:00
Jaime Wren b00f0ff5fd For 'dartdev format' and 'dartdev format --help', return the output from dartfmt --help, instead of the default output from FormatCommand.printUsage(). This is follow up on https://dart-review.googlesource.com/c/sdk/+/133042
Change-Id: I497e983a2302fbb010256a4961b6121294a9de82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134106
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-02-03 17:51:36 +00:00
Devon Carew c8ed304e97 [dartdev] add a dartdev 'create' command
Change-Id: I95625a9c422335ba5de92c887afce9eb564d6a04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133460
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-02-02 02:23:13 +00:00
Jaime Wren c856de0747 Initial test_all.dart, the dart bots test all the files ending in "_test.dart", this file allows developers to easily run all the tests themselves.
Change-Id: I103aae2340062b68ae7c90b6cef67f7e2eba63a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133432
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-01-27 22:04:39 +00:00
Jaime Wren 38b8dc7b21 Move dartdev command tests under a new command directory and add an initial format_test.dart
Change-Id: Ib91cd58341f994f2e7613d5a55ee16c0d4ef8ecc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133042
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-01-27 19:49:24 +00:00
Jaime Wren e9bd2595f4 Add an initial tests for dartdev that can execute and pass on the Dart build bots, as well as locally.
Change-Id: I92b24b7b5252d2f2dab97fe552406b7e97fc927c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132703
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-01-22 20:31:08 +00:00
Jaime Wren 4da1bb0da7 Initial and intentionally minimal pkg/dartdev/ package.  This includes some initial CLI utilities and test file.
Change-Id: I2b8485a1918fb0f1b6c5f0cbe626418aeef9c06e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132025
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-01-21 18:21:47 +00:00