Commit Graph

141 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
Mike Fairhurst ba372d6e8a [dartdev] Remove unused dart:async import
Change-Id: I800a2f3f85520149e73a541dac4cd1a7a04f1222
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161466
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-09-02 17:37:57 +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
Robert Nystrom 88b77feb73 Roll dart_style 1.3.7 into the SDK.
The main reason is that this adds better help text when run from
`dart format`. But it includes a couple of other changes and fixes:

* Don't crash when non-ASCII whitespace is trimmed.
* Split all conditional expressions (`?:`) when they are nested.
* Handle `external` and `abstract` fields and variables.

Change-Id: I59326e693bfe538013cd23b58924461f60e8e908
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160981
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-08-31 18:07:44 +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 904d1ea51e Add a missing test file, experiments_test.dart, into the pkg/dartdev/test/test_all.dart file
Change-Id: I33a73e63b4c28f373785e48f0d63f6d9bd04c411
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160921
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-08-28 19:41:58 +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 9bac327e32 [ VM / dartdev ] Fix issue where hard-coded false value for 'null_safety' flag in dartdev's Dart_IsolateFlags
was overwritten by isolate initialization code

Fixes situation where the following command would fail due to the
dartdev kernel not being compiled with null-safety:

dart --strong-null-safety --enable-experiment=non-nullable run foo.dart

Change-Id: I7e7c980eb3274a51e64c031e6bfef8650b897b8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158345
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-08-13 22:04:24 +00:00
Clement Skau ebae77f1b7 [Test] Nit: Makes compile_test fail more informative.
Moves the file check after the stderr and exitCode check to show any
process error before checking for success output from the process.
In effect we'll now see the error message from the compiler when the
binary isn't created.

Change-Id: I2fb5c87caf6b87f5cff5c89eccaebd2690b20408
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158009
Auto-Submit: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2020-08-11 11:07:19 +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
Devon Carew 31361ff444 [deps] bring cli_util 0.2.0 into the repo; update the analyzer dep
Change-Id: I705d500a745b5ca972bdc49314b39ee9357989f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157541
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-06 17:27:29 +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
Brian Wilkerson 90ad9a810f Reference the design principles from the README
Change-Id: I362587bf98c18f14a2086116e50d47e58b06529c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156420
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-29 23:10:01 +00:00
Brian Wilkerson 1bf8019253 A document in which to capture dartdev design principles
Change-Id: I5db4055b2fe950c09cdfe95c3f08270bf3f5df7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156380
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-29 21:53:48 +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