Commit Graph

77 Commits

Author SHA1 Message Date
Devon Carew 1d221b2d93 [dartev] address a few analysis issues in pkg/dartev
Change-Id: Ia6373183dc58f30225b8789ac9ca9816c55d1516
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152182
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-06-23 21:40:23 +00:00
Ben Konyi 82de6e0854 [ VM / DartDev ] Forward --enable-experiment=... to DartDev
VM portion of https://github.com/dart-lang/sdk/issues/42339

Change-Id: I97fa7ec0847aa4ed75fc5aaab2d75c1ca514aa66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151890
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-06-23 17:49:02 +00:00
Michael Thomsen f0c87e9f21 Clean up no-publish comments in pubspecs
Change-Id: I6cc1ab404de75cd02183b862842198c85b6d9256
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152005
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-23 10:34:09 +00:00
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 f0f5cad10e Update the pubspec.yaml file in pkg/dartdev/
Change-Id: Iad0af73fc25b571fdcae9f21c4da00441ee4416e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151802
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-06-19 16:37:23 +00:00
Jaime Wren a8504f8509 Update the dartdev README.md file
Change-Id: Icb09c8654c2c5a2d2f1a056af343eea35221aabf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150660
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-06-09 19:39:25 +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
Michael Thomsen 1c03e1ce7d Add -t abbreviation for consistency with flutter create:
```
$ flutter help create
Create a new Flutter project.

Usage: flutter create <output directory>
-h, --help                     Print this usage information.
-t, --template=<type>          Specify the type of project to create.
```

Change-Id: I3933eabc758988950cb34cea6982eb342a391823
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148130
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2020-06-02 21:23:43 +00:00
Jaime Wren 3cef87a516 Cleanup format.dart now that recent dartfmt has been rolled forward
Change-Id: Idcdf36c2a4e080d24326fb58f90133f3445a5f0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149641
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-06-02 15:11:41 +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
Ben Konyi 3570d52a76 [ DartDev ] Always use the resolved executable as the preferred Dart binary
Fixes https://github.com/dart-lang/sdk/issues/42004

Change-Id: I4f30c938ea7a67672320245f6a2869ea0744a728
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148950
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-05-27 17:36:50 +00:00
Devon Carew 4ee57c08e0 [dartdev] show the stack trace when we fail with an unexpected exception
Change-Id: Idf0d39b3887393f8cb8b763fa66e52b2721ce3db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148901
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-05-21 20:16:33 +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
Jaime Wren e15cec996a Prevent relative files from being returned from sdk.dart.
These changes fix and prevent future versions of https://github.com/dart-lang/sdk/issues/41953

Bug: https://github.com/dart-lang/sdk/issues/41953
Change-Id: I35760a97807ae5e50e57c1cb4ab8ca3bde31a5ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148660
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-05-20 18:51:00 +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
Ben Konyi 2063ce7437 [ package:dds ] Added authentication code support
Also fixed issue where not all VM flags were being forwarded to the child
of an implicit DartDev instance.

Change-Id: I4c7bacb1b93ae336b6ed1f80eb621fbeabd8ced9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148021
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-05-14 01:32:26 +00:00
Ben Konyi b9da2c1d2e [ VM / DartDev ] Default to port 8181 for DDS
Change-Id: I5356e962895add05663752e3f062181ded669dd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147922
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-05-13 23:34:57 +00:00
Ben Konyi 444490d640 Reland "[ VM / DartDev ] Run all debugging sessions via 'dart run'"
This is a reland of 604a366065

Original change's description:
> [ VM / DartDev ] Run all debugging sessions via 'dart run'
> 
> Prior to this change, running `dart --observe foo.dart` would result in
> the DartDev flow being bypassed. While `dart foo.dart` will continue to
> bypass DartDev and be run directly, running either `dart --observe
> <vm-flags> foo.dart` or `dart --enable-vm-service <vm-flags> foo.dart`
> will result in the command being implicitly converted to `dart run
> --observe <vm-flags> foo.dart`. This is required for all standalone VM
> instances to run against DDS instead of the VM service directly.
> 
> As usual, the DartDev flow can always be bypassed by providing the
> --disable-dart-dev flag.
> 
> Change-Id: I211cd1ec4b1ec0e75ae0a568a66f1a0fc7b3852f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147342
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

Change-Id: I917d3056322d74766bdf376a3e28871ad5b66cfa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147980
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-05-13 19:58:56 +00:00
David Morgan 964f966c0c Revert "[ VM / DartDev ] Run all debugging sessions via 'dart run'"
This reverts commit 604a366065.

Reason for revert: Breaks google3, see b/156414355

Original change's description:
> [ VM / DartDev ] Run all debugging sessions via 'dart run'
> 
> Prior to this change, running `dart --observe foo.dart` would result in
> the DartDev flow being bypassed. While `dart foo.dart` will continue to
> bypass DartDev and be run directly, running either `dart --observe
> <vm-flags> foo.dart` or `dart --enable-vm-service <vm-flags> foo.dart`
> will result in the command being implicitly converted to `dart run
> --observe <vm-flags> foo.dart`. This is required for all standalone VM
> instances to run against DDS instead of the VM service directly.
> 
> As usual, the DartDev flow can always be bypassed by providing the
> --disable-dart-dev flag.
> 
> Change-Id: I211cd1ec4b1ec0e75ae0a568a66f1a0fc7b3852f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147342
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com

Change-Id: I688a3779e7ccaf85a28dc4d6f5ccf23596109519
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147900
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-05-13 07:13:35 +00:00
Ben Konyi 604a366065 [ VM / DartDev ] Run all debugging sessions via 'dart run'
Prior to this change, running `dart --observe foo.dart` would result in
the DartDev flow being bypassed. While `dart foo.dart` will continue to
bypass DartDev and be run directly, running either `dart --observe
<vm-flags> foo.dart` or `dart --enable-vm-service <vm-flags> foo.dart`
will result in the command being implicitly converted to `dart run
--observe <vm-flags> foo.dart`. This is required for all standalone VM
instances to run against DDS instead of the VM service directly.

As usual, the DartDev flow can always be bypassed by providing the
--disable-dart-dev flag.

Change-Id: I211cd1ec4b1ec0e75ae0a568a66f1a0fc7b3852f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147342
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-05-12 19:53:11 +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
Ben Konyi c936e02f32 [ dartdev ] Print no such file error instead of invalid command for *.dart arguments
Fixes https://github.com/dart-lang/sdk/issues/41058

Change-Id: I4d7a5d99392b52433b31cf863cd42d355617a14f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146690
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-05-06 16:53:22 +00:00
Ben Konyi 918eae3e5e Reland "[ dartdev / DDS ] Spawn a Dart Development Service instance when running with --observe via dartdev"
This reverts commit 798b6e7c8d.

Change-Id: I5af5eb126d83d8f67b18d5159ead0a276665034e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146661
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-05-05 18:48:58 +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
Ben Konyi 798b6e7c8d Revert "[ dartdev / DDS ] Spawn a Dart Development Service instance when running with --observe via dartdev"
This reverts commit ffbd84d383.

Reason for revert: Failing build on golem and failing test on simarm bot. Will investigate tomorrow.

Original change's description:
> [ dartdev / DDS ] Spawn a Dart Development Service instance when running with --observe via dartdev
> 
> Dartdev will now spawn a DDS instance when the --observe flag is
> provided. The stdio streams from the target process are filtered to
> replace any references to the true VM service URI with the DDS URI.
> 
> If arguments are provided to --observe to configure the server, the
> arguments will be used when spawning DDS instead of the VM service.
> 
> Change-Id: I48888c391135fc9f1e7f92d2a86855071e6b4aaf
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145680
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

TBR=jwren@google.com,bkonyi@google.com,rmacnak@google.com,asiva@google.com

Change-Id: I750325b45692ff7a40066b37924b01fa98a692d3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146522
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-05-05 02:17:36 +00:00
Ben Konyi ffbd84d383 [ dartdev / DDS ] Spawn a Dart Development Service instance when running with --observe via dartdev
Dartdev will now spawn a DDS instance when the --observe flag is
provided. The stdio streams from the target process are filtered to
replace any references to the true VM service URI with the DDS URI.

If arguments are provided to --observe to configure the server, the
arguments will be used when spawning DDS instead of the VM service.

Change-Id: I48888c391135fc9f1e7f92d2a86855071e6b4aaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145680
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-05-05 01:18:28 +00:00
Ben Konyi c800b26816 [ VM / DartDev ] Make DartDev help message the default when running dart --help
Running the standalone VM in the following ways will result in the
DartDev help message being shown:

- `dart`
- `dart --help`

The following will output the VM help message:

- `dart run`
- `dart help run`
- `dart --help --verbose` (includes verbose VM flags)
- `dart help run --verbose` (includes verbose VM flags)
- `dart run --verbose` (includes verbose VM flags)

The original standalone VM behavior can be restored by providing the --disable_dart_dev flag.

Change-Id: I67cf015d62366efdfd8bf9b215d4319fd5af3f46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144497
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-04-27 22:39:06 +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
Ben Konyi 8750a915c9 [ DartDev ] Allow for verbose VM options to be displayed via dart help --verbose run
Change-Id: I27955c8515ca6a194037ee13f59e70ed43eefec3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144461
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-04-22 18:27:19 +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
Jaime Wren 414f6625f8 Remove TODO and comments with regard to running packages in the dart run * command
If/ when we decide to support it, we can modify the description and implement it

Change-Id: Ia222227017397aa817ac55c4dfed6e4647c05556
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141854
Commit-Queue: Jonas Jensen <jonasfj@google.com>
Auto-Submit: Jaime Wren <jwren@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2020-04-01 08:35:41 +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 7dac294cb3 Minor cleanup in pub.dart, pub command in dartdev
Change-Id: I38c915502e8ff98fc13fba737913c61e0940cdf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141901
Auto-Submit: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-03-31 19:49:16 +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 d2d5e6e1dc [dartdev] use the prefer_relative_imports lint
Change-Id: I4cb5c9d54e30773a995d3f392a5cfa649d8a758a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140801
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-03-24 21:08:37 +00:00
Devon Carew 0df334ebac [dartdev] add help text for 'dartdev test'
Change-Id: Ibb8cc8a4995008e730f9cc4499479ca689d9edd4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140765
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-03-24 16:52:10 +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