Commit Graph

108 Commits

Author SHA1 Message Date
Ben Konyi e498ca00dc [VM] Temporarily disable DDS for 2.10 branch
Change-Id: I32916b8e816e109d4e659e9b05326cd0fffb85d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161764
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-09-04 02:25:35 +00:00
Devon Carew b3930c3ded [dartdev] add custom help messages to 'dart test' when package:test is not available
Change-Id: I536b4068319b785bb4ac2e8ccceb7df4c67c30e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161763
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-09-03 22:06:45 +00:00
Ben Konyi f0d88cc96d Reland "[ Service / DDS ] Advertise DDS as the VM service, bump version to 4.0"
This reverts commit ed120c3c80.

Change-Id: I445f4bb2dafaad3ce2daa3ae42efe1723f9b1abe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160660
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-09-03 15:20:14 +00:00
Robert Nystrom ad259b530a Pass verbose flag to "format" command.
Change-Id: Iaa47d2d8d2aed6224fc68fe2348d7e3b09499506
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161241
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-08-31 22:54:30 +00:00
Devon Carew 2e76fecacb [dartdev] a few more updates to the dartdev tool help
Change-Id: I40beba78d27cf20d282b8551eda2654653637b12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161182
Reviewed-by: Kathy Walrath <kathyw@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-08-31 22:31:40 +00:00
Devon Carew f81dadfa32 [dartdev] update the help text for dartdev and related commands
Change-Id: Ia7139b109872575e58fa8f1cbc4aa72bef44bee5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-08-31 20:17:48 +00:00
Michael Thomsen cb39018489 Fix terminology
Related to https://github.com/dart-lang/sdk/issues/42136

Followup to https://dart-review.googlesource.com/c/sdk/+/149595/1

Change-Id: I9427374434d9d38c6b83f71466445edf6db5ea02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161107
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2020-08-31 13:16:08 +00:00
Devon Carew 6285ddc4fa [dartdev] print usage when no file is provided for dart run; re-generate the readme
Change-Id: I6ce61c5343e2274c92b9e7076c8f318cfa3c2388
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160922
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-08-28 21:35:18 +00:00
Jaime Wren 09c09f2e50 Fix a bad git merge between https://dart-review.googlesource.com/c/sdk/+/160140 and https://dart-review.googlesource.com/c/sdk/+/159341
Change-Id: Ib4fc0ec9c933e16f634ce876098e61be1945098e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160940
Commit-Queue: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Auto-Submit: Jaime Wren <jwren@google.com>
2020-08-28 21:15:08 +00:00
Brian Wilkerson 8d3c05f550 Improve indentation for the output of the dart analyze command
Change-Id: If248d3994c8081f60d42dbbbe92f4c9e5dbfbb34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160923
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-08-28 20:43:48 +00:00
Jaime Wren 2ca30d8d19 Dartdev bug fix, this fixes https://github.com/dart-lang/sdk/issues/43238
Bug: https://github.com/dart-lang/sdk/issues/43238
Change-Id: I166b8c24b7ba708d619fd33415c18220eae6dc58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160882
Auto-Submit: Jaime Wren <jwren@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-08-28 18:21:48 +00:00
Brian Wilkerson 455bef7cb2 Fix an NPE in verbose mode when there are no context messages
Bug: https://github.com/dart-lang/sdk/issues/43239
Change-Id: I25ec04cce71533fb9bf061d36c405c1131009be1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160881
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-28 18:12:08 +00:00
Devon Carew 7e0412a68c [dartdev] adjust some error output and help text
Change-Id: I6170c3c53cb1b6c293cd53a4c0890b7bff9c7b44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160784
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-08-28 16:01:48 +00:00
Devon Carew b605afe53a [dartdev] some refactoring to the ArgParser handling code in dartdev
Change-Id: I727561cf542023426aa4f8a31427d951127c4f66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160703
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-08-27 20:32:07 +00:00
Jaime Wren 158a470b0c Configure all ArgParsers in dartdev to have consistent usageLineLengths.
Change-Id: Ia69ae2efb280b6875bb769d1f3bbb91b64e50a14
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160380
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Auto-Submit: Jaime Wren <jwren@google.com>
2020-08-27 17:50:47 +00:00
Jaime Wren 9c6b639382 Remove the current support dartdev analytics support for reporting flags used
Bug: https://github.com/dart-lang/sdk/issues/43198
Change-Id: I212f8508614876d926b35cf199499bce783a196d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160360
Auto-Submit: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-08-26 20:32:25 +00:00
Devon Carew 504195907b [dartdev] don't expose the 'dart migrate' command on the stable channel
Change-Id: I95d5d9dd74e488c749f17fd358d20188de32866c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160184
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-08-26 17:42:55 +00:00
Ben Konyi ed120c3c80 Revert "[ Service / DDS ] Advertise DDS as the VM service, bump version to 4.0"
This reverts commit 0ea18ffb36.

Reason for revert: Tree is on fire

Original change's description:
> [ Service / DDS ] Advertise DDS as the VM service, bump version to 4.0
> 
> This change does the following:
>   - The DDS URI will be reported by the VM as the VM service URI. If DDS
>     disconnects, the VM service URI will be reported instead. This only
>     impacts the standalone VM.
>   - Updated the service protocol to 4.0 and removed the following
>     deprecated functionality:
>       - Client synchronization RPCs (these now live in DDS)
>       - getWebSocketTarget (no longer needed as the VM service no longer
>         tries to redirect web socket clients to DDS)
>   - Regenerates package:vm_service based on the new spec, prepare for
>     5.0 release
> 
> Change-Id: I8a2b401062342eb99b81ef10ef6926baa88f946e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160141
> Reviewed-by: Siva Annamalai <asiva@google.com>

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

Change-Id: I6a16e9fa7ceb18555d6424a169cfa811d3833419
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160340
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-08-26 16:08:27 +00:00
Ben Konyi 0ea18ffb36 [ Service / DDS ] Advertise DDS as the VM service, bump version to 4.0
This change does the following:
  - The DDS URI will be reported by the VM as the VM service URI. If DDS
    disconnects, the VM service URI will be reported instead. This only
    impacts the standalone VM.
  - Updated the service protocol to 4.0 and removed the following
    deprecated functionality:
      - Client synchronization RPCs (these now live in DDS)
      - getWebSocketTarget (no longer needed as the VM service no longer
        tries to redirect web socket clients to DDS)
  - Regenerates package:vm_service based on the new spec, prepare for
    5.0 release

Change-Id: I8a2b401062342eb99b81ef10ef6926baa88f946e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160141
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-08-26 14:55:15 +00:00
Jaime Wren 2d931c32e6 Fix in dartdev to enable the query of help output for pub subcommands
Bug: https://github.com/dart-lang/sdk/issues/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>
2020-08-25 22:27:43 +00:00
Devon Carew 0b2da6e7ef [dartdev] fix dart create and improve the tests.
Change-Id: If949a0f50e3b37619df9051c1ab892e77cb5a391
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160142
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-08-25 20:40:03 +00:00
Devon Carew 85d6329908 adjust the dartdev help text for language experiments
Change-Id: I869a246d989ab41cba0619873de141dab6ebb280
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160140
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-08-25 18:05:10 +00:00
pq 6eb8ec00d7 enable (hidden) fix command
Change-Id: Ida0ac91ebb21d65c61a4bd6f51ed67f8e3f85122
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159648
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-21 22:03:00 +00:00
Ben Konyi d11e89f516 [ Service ] Wait for DDS connection before outputting service connection
information

When dartdev and the VM service are enabled, the service should avoid
advertising its connection information until after DDS has connected in
order to prevent race conditions between DDS and external clients.

Fixes https://github.com/dart-lang/sdk/issues/42727

Change-Id: If6393f085e9147af628997a1f8936e84f9d8310c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157462
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-08-20 19:00:59 +00:00
Devon Carew da2bff9c96 update the dartdev pubspec file; various lint fixes
Change-Id: Ib4bc6af7f77001895cbc534ef64c6d999008695f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159160
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-08-18 17:12:45 +00:00
Jaime Wren 90756064f9 If the machine is a bot such as a CI machine, prevent the 'The Dart tool uses Google Analytics to anonymously report feature usage...' message from being printed from dartdev.
Bug: https://github.com/dart-lang/sdk/issues/43046
Change-Id: I63c1d73bfd31af14e0a93669a43994222e2f3a50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158920
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-08-18 17:04:40 +00:00
Jaime Wren 538e2e4778 Include a simple README.txt in $HOME/.dart
Fixes https://github.com/dart-lang/sdk/issues/42500

Change-Id: Iec9c6dd3d7c279ddd5eb9ba7fdb934ecd712ad69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158521
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-08-17 22:01:35 +00:00
Jaime Wren 7fa6490ed4 Copy the dart:test ArgParser from https://github.com/dart-lang/test/ to dartdev to have the dart test --help / dart help test command return faster and in a more robust manner.
Bug: https://github.com/dart-lang/sdk/issues/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>
2020-08-17 18:28:59 +00:00
Jaime Wren dec0a1857c Dartdev change to detect stdout.hasTerminal as a new requirement- until the disclosure is shown, with hasTerminal, analytics won't be enabled
Change-Id: I525da104105b01dd0e2669d41c05b6101bb28321
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158202
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-08-14 19:27:19 +00:00
Ben Konyi df18aaa460 [ dartdev ] Set run command help message width to match terminal size
Change-Id: Icd23bcd0993da30266574ad5f4d17c06ba95b364
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158400
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-08-14 16:21:08 +00:00
Zichang Guo 45643c26f5 add comments dartdev run
Resolve the comment of https://dart-review.googlesource.com/c/sdk/+/157107

Change-Id: I328d55a95f876651e9864d8634edd184601556ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157661
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-08-13 23:48:52 +00:00
Ben Konyi 7a8b267a39 [ dartdev ] Set maximum help message character width to 120 characters
Fixes https://github.com/dart-lang/sdk/issues/42964

Change-Id: Ib05b030e71b0fb266b1952b8c2a45eb7f96cfd76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158065
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-08-11 00:10:04 +00:00
Ben Konyi 507ffcfdaf [ DartDev ] Fixed issue where flags passed after the script name when
using 'dart run' would be interpreted by the 'dart run' argument parser

Fixes https://github.com/dart-lang/sdk/issues/42941

Change-Id: I46d7654d62b4575f0684f7faae51d972ac5f7f8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157542
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-08-06 19:49:02 +00:00
Ben Konyi 31257927e3 [ DartDev ] Add kernel subcommand for compile command
This change adds support for generating simple kernel files. More exotic
kernel generation can still be done using the gen_kernel script.

Fixes https://github.com/dart-lang/sdk/issues/42602

Change-Id: If5f281770dada4a81d85d81d2c36439174540724
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153389
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-08-05 21:25:39 +00:00
Zichang Guo 79a9e3b54a Fix failing dartdev run test on pkg win
Uri.toFilePath() might throw errors. If it failed, we should fall back
to use file path and try it a try. This fixes the current red pkg win
bot caused by https://dart-review.googlesource.com/c/sdk/+/156922.

Change-Id: Id67723041d222f477d7584fb73a0d77eb91cd41c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157107
Reviewed-by: Zichang Guo <zichangguo@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-08-05 06:37:10 +00:00
Zichang Guo d4e5212c4d dartdev run commands with file uris
Dart executable accepts a File uri (File://dir/name.dart) as an input,
dartdev run should have the same behavior.

Change-Id: I265ef8242314dbb41c5735c65ee203bbbf76f78e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156922
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-08-05 03:06:40 +00:00
Ben Konyi 501c807266 [ VM / DartDev ] Update argument handling for 'run' command
Previously the help messages for 'dart run' were output by a secondary
VM spawned solely to print the VM's help message. However, this help
message was not consistent with those found for other DartDev commands.

With this change, the 'run' command:

- Uses package:args to create a help message consistent with other
 DartDev commands.

- No longer accepts arbitrary options and is instead restricted to a
 subset of common flags. Passing a VM flag which is not included in
 this subset of commands will result in an argument error if passed
 *after* the 'run' command. Other VM flags can be passed immediately
 following 'dart' and before the DartDev command.

- No longer outputs the VM verbose options when invoked with '--help
 --verbose'. VM verbose options and the original VM help message can
 be viewed by running 'dart --help --verbose'. This makes uncommon
 VM flags used for development less visible to regular users.

- Now properly forwards the subset of VM options accepted by 'run' to
 the VM (e.g., 'dart run --observe --no-pause-isolates-on-exit foo.dart'
 would have ignored '--no-pause-isolates-on-exit').

Change-Id: Ie56b767cc21e6af3630c742458a6c3e9f7418250
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155841
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-07-31 21:41:10 +00:00
Zichang Guo 9b6dbd1481 dart run drops wrong argument
With "--enable-experiment" arguments, dartdev drops the wrong argument.

Change-Id: I3cf6b3bc1f21c7c8c33ef8e48236dfcd5a009c3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156480
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-07-31 01:06:58 +00:00
Zichang Guo ca1279e7e3 Fix DartDev run command failed reading Windows path
On Windows platform, backslashes are used as path separator. (Forward
slashes are also accepted by Windows APIs for most cases) But for an Uri
backslashes will be percent-encoded in the Uri. The other problem is
that "C:\directory" when passed into Uri, the drive letter will be
misinterpreted into scheme (common schemes like "http" or "file").

Bug: https://github.com/dart-lang/sdk/issues/42874
Change-Id: I0fe287b65a5b4faeb791665d2fda9ea0a9744cc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156363
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-07-30 02:25:10 +00:00
Ben Konyi 8dc4833e86 [ VM/ DDS ] Temporarily disable DDS for beta release
https://github.com/dart-lang/sdk/issues/42727 isn't expected to be fixed
before the next beta release. Disabling DDS temporarily until a proper
fix has been landed.

Change-Id: Ib3233e75a115caa9625f1e96d136b0f6abc5f72e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156343
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-07-30 01:11:51 +00:00
Ben Konyi 45d8bd79f1 [ DartDev ] Launch from snapshot in the current process when possible
Instead of spawning new processes to run a tool for a command, this
change makes it so we run within the current process when possible. In
general, we should avoid spawning any processes when possible from
dartdev unless:

- We need to interact with the child process from dartdev (e.g.,
  analysis server)
- The child needs to interact with the parent process (e.g., DDS)

Change-Id: I9c8cd39de038ab2f3a699165a47bee4c281bda67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156048
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-07-29 17:28:36 +00:00
pq 2cd8fc1e97 fix command
(Disabled; comment in to enable.)

The command calls out to the DAS using the bulk fix protocol to fix all bulk-fixable issues.

Fixable diagnostics are captured in the `BulkFixProcessor.lintProducerMap`.


Sample output:


```
[~/src/repos/dart/sdk/pkg/dartdev] (fix_cmd) $ dart bin/dartdev.dart fix

*** The `fix` command is provisional and subject to change or removal in future releases. ***

Computing fixes in dartdev...          5.0s
Applying fixes to:
  lib/dummy2.dart
  lib/dummy.dart
Done.
```


Change-Id: I71f82623a452cb747bfc13dba0bb764ec9b1a15b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156046
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-07-28 22:02:51 +00:00
Ben Konyi c2559967b5 [ DartDev ] Print error to console when trying to launch a missing SDK
artifact (e.g., snapshots)

This should never happen in a stable release unless the SDK installation
is corrupted, but can happen when only building the 'runtime' build
target.

Fixes https://github.com/dart-lang/sdk/issues/42601

Change-Id: I00bd9538984b26350780fc58754169e79e91d24e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156023
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-07-27 21:34:23 +00:00
Ben Konyi a2fc68c8d2 [ DartDev ] Update CompileNative subcommand help messages to no longer reference dart2native
Fixes https://github.com/dart-lang/sdk/issues/42600

Change-Id: I1e29b0ec1133d13d25f7925a9bd152d671e5a686
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155243
Reviewed-by: Jaime Wren <jwren@google.com>
2020-07-21 20:50:04 +00:00
Ben Konyi 157ebfe50f Reland "[ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process"
This reverts commit 7e373831ce.

Change-Id: Ib94d793a5753ec6352cd9a65e35f726a63336368
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154830
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-07-21 16:23:18 +00:00
Alexander Aprelev 7e373831ce Revert "Reland "[ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process""
This reverts commit bc4cb123a8.

Reason for revert: breaks crossword simarm tests https://ci.chromium.org/p/dart/builders/ci.sandbox/vm-kernel-precomp-linux-debug-simarm_x64/2619

Original change's description:
> Reland "[ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process"
> 
> This CL changes how DartDev is run and how the run command handles executing a Dart program (will port additional commands in a separate CL). Rather than using DartDev to spawn a child process to run user code, the VM will instead launch a DartDev isolate after doing some VM options processing. DartDev will communicate information like exit codes and script/arg pairs with the VM via isolate ports. Once DartDev runs to completion and notifies the VM that a script should be run, the VM will move on to spawning another isolate with user code and continue executing in the same VM process.
> 
> By moving DartDev into an isolate within the same process that user code will eventually run in we're able to resolve the following issues that arose due to signal handling and IPC issues:
> 
> VM hangs when --enable-vm-service is supplied and there are compile time errors (https://github.com/dart-lang/sdk/issues/42630)
> Dart daemon spinning in exit code handler / zombie Dart processes (https://github.com/dart-lang/sdk/issues/41978)
> Signal handling in children of 'dartdev run' is problematic (https://github.com/dart-lang/sdk/issues/42092)
> 
> This reverts commit 3849b5061c.
> 
> Change-Id: I4fd3ba33840771a9f284d733c4a25fac6cde64ca
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154706
> Reviewed-by: Siva Annamalai <asiva@google.com>

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

Change-Id: I649d94c668417f2edbfd7039fa5c876e10dc32fe
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154800
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-07-17 04:37:48 +00:00
Ben Konyi bc4cb123a8 Reland "[ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process"
This CL changes how DartDev is run and how the run command handles executing a Dart program (will port additional commands in a separate CL). Rather than using DartDev to spawn a child process to run user code, the VM will instead launch a DartDev isolate after doing some VM options processing. DartDev will communicate information like exit codes and script/arg pairs with the VM via isolate ports. Once DartDev runs to completion and notifies the VM that a script should be run, the VM will move on to spawning another isolate with user code and continue executing in the same VM process.

By moving DartDev into an isolate within the same process that user code will eventually run in we're able to resolve the following issues that arose due to signal handling and IPC issues:

VM hangs when --enable-vm-service is supplied and there are compile time errors (https://github.com/dart-lang/sdk/issues/42630)
Dart daemon spinning in exit code handler / zombie Dart processes (https://github.com/dart-lang/sdk/issues/41978)
Signal handling in children of 'dartdev run' is problematic (https://github.com/dart-lang/sdk/issues/42092)

This reverts commit 3849b5061c.

Change-Id: I4fd3ba33840771a9f284d733c4a25fac6cde64ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154706
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-07-17 00:54:11 +00:00
Ben Konyi 3849b5061c Revert "[ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process"
This reverts commit ffe258d2d4.

Reason for revert: Failures on bots

Original change's description:
> [ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process
> 
> This CL changes how DartDev is run and how the run command handles executing a Dart program (will port additional commands in a separate CL). Rather than using DartDev to spawn a child process to run user code, the VM will instead launch a DartDev isolate after doing some VM options processing. DartDev will communicate information like exit codes and script/arg pairs with the VM via isolate ports. Once DartDev runs to completion and notifies the VM that a script should be run, the VM will move on to spawning another isolate with user code and continue executing in the same VM process.
> 
> By moving DartDev into an isolate within the same process that user code will eventually run in we're able to resolve the following issues that arose due to signal handling and IPC issues:
> 
> VM hangs when --enable-vm-service is supplied and there are compile time errors (https://github.com/dart-lang/sdk/issues/42630)
> Dart daemon spinning in exit code handler / zombie Dart processes (https://github.com/dart-lang/sdk/issues/41978)
> Signal handling in children of 'dartdev run' is problematic (https://github.com/dart-lang/sdk/issues/41978)
> 
> Change-Id: I1c6b1425831b691ad20284716aa80f817dbaf607
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152588
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

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

Change-Id: Idb1d24a4524bdc3ccfb199a82710f3c0d9db539a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154702
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-07-16 19:50:57 +00:00
Ben Konyi ffe258d2d4 [ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process
This CL changes how DartDev is run and how the run command handles executing a Dart program (will port additional commands in a separate CL). Rather than using DartDev to spawn a child process to run user code, the VM will instead launch a DartDev isolate after doing some VM options processing. DartDev will communicate information like exit codes and script/arg pairs with the VM via isolate ports. Once DartDev runs to completion and notifies the VM that a script should be run, the VM will move on to spawning another isolate with user code and continue executing in the same VM process.

By moving DartDev into an isolate within the same process that user code will eventually run in we're able to resolve the following issues that arose due to signal handling and IPC issues:

VM hangs when --enable-vm-service is supplied and there are compile time errors (https://github.com/dart-lang/sdk/issues/42630)
Dart daemon spinning in exit code handler / zombie Dart processes (https://github.com/dart-lang/sdk/issues/41978)
Signal handling in children of 'dartdev run' is problematic (https://github.com/dart-lang/sdk/issues/41978)

Change-Id: I1c6b1425831b691ad20284716aa80f817dbaf607
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152588
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-07-16 19:03:24 +00:00
Jaime Wren d1a06cf97b Update dartdev to use the format command object from dart_style.
I thought that this landed over a month ago.  This needs to be rolled into the Dart SDK 2.9

New output from dart format --help:

Idiomatically formats Dart source code.

Usage: dart format [options...] <files or directories...>
-h, --help                             Print this usage information.

Common options:
-o, --output                           Where formatted output should be written.

          [json]                       Print code and selection as JSON
          [none]                       Discard.
          [show]                       Print code to terminal.
          [write] (default)            Overwrite formatted files on disc.

    --show                             Which filenames to print.

          [all]                        All visited files and directories.
          [changed] (default)          Only the names of files whose formatting is changed.
          [none]                       No file names or directories.

    --summary                          Summary shown after formatting completes.

          [line] (default)             Single line summary.
          [none]                       No summary.
          [profile]                    Tracks how long it took for format each file.

Non-whitespace fixes (off by default):
    --fix                              Apply all style fixes.
    --fix-doc-comments                 Use triple slash for documentation comments.
    --fix-function-typedefs            Use new syntax for function type typedefs.
    --fix-named-default-separator      Use "=" as the separator before named parameter default values.
    --fix-optional-const               Remove "const" keyword inside constant context.
    --fix-optional-new                 Remove "new" keyword.
    --fix-single-cascade-statements    Remove unnecessary single cascades from expression statements.

Other options:
-l, --line-length                      Wrap lines longer than this.
                                       (defaults to "80")
-i, --indent                           Spaces of leading indentation.
                                       (defaults to "0")
    --set-exit-if-changed              Return exit code 1 if there are any formatting changes.
    --follow-links                     Follow links to files and directories.
                                       If unset, links will be ignored.
    --version                          Show version information.

Options when formatting from stdin:
    --selection                        Selection to preserve formatted as "start:length".
    --stdin-name                       The path name to show when an error occurs.
                                       (defaults to "stdin")

Run "dart help" to see global options.


Change-Id: I18a49abd919672e988296f83c23636b14c29bdeb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153900
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-07-10 19:10:07 +00:00