Commit Graph

223 Commits

Author SHA1 Message Date
Ben Konyi b036052077 Reland "[ Service ] Update VM service message to not reference Observatory"
This reverts commit ee5837aa7a.

Updated Intellij plugins have been published which support the new
message.

TEST=CQ

Change-Id: I81f6d878f036991a95cc1f58d3102015e77aa609
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237741
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-03-17 23:15:57 +00:00
pq 47a52fc5de lint 2.0 fixes
In anticipation of lints v 2.0.

See: https://dart-review.googlesource.com/c/sdk/+/237746

Change-Id: I42bcdfa43d4707324622b498c57dde6e2fe1f13b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237762
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-03-17 23:11:28 +00:00
Ben Konyi 8c484d12fe Reland "[ Service / DDS ] Remove VM service polling logic, add --enable-service-fallback-port support to DDS"
This reverts commit d4f71515c7.

TEST=CQ

Change-Id: I180f9d045870a1ff5f7f3f82b6f4782e18c18cfc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237440
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-03-15 18:14:42 +00:00
Emmanuel Pellereau d4f71515c7 Revert "[ Service / DDS ] Remove VM service polling logic, add --enable-service-fallback-port support to DDS"
This reverts commit bd8590ba9b.

Reason for revert: breaks google3 (b/224731131)

TEST=Clean revert

Original change's description:
> [ Service / DDS ] Remove VM service polling logic, add --enable-service-fallback-port support to DDS
>
> Polling logic was introduced due to a bug in Fuchsia's network stack
> which could result in the VM service attempting to start the server
> before the network stack was initialized. This issue should be resolved
> now, so this logic is no longer necessary.
>
> TEST=pkg/dartdev/test/commands/run_test.dart
>
> Change-Id: I10f185dfb1be1b0363983f3e0564d65c38c99ea8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235763
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

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

Change-Id: I3016fad25220c4e5479f17294626d79a17bd316a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237360
Reviewed-by: Alexander Thomas <athom@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Emmanuel Pellereau <emmanuelp@google.com>
Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com>
2022-03-15 12:01:30 +00:00
Ben Konyi bd8590ba9b [ Service / DDS ] Remove VM service polling logic, add --enable-service-fallback-port support to DDS
Polling logic was introduced due to a bug in Fuchsia's network stack
which could result in the VM service attempting to start the server
before the network stack was initialized. This issue should be resolved
now, so this logic is no longer necessary.

TEST=pkg/dartdev/test/commands/run_test.dart

Change-Id: I10f185dfb1be1b0363983f3e0564d65c38c99ea8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235763
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-03-14 21:44:29 +00:00
Tess Strickland 6ef426d7df MacOS-Signable Compiled Dart Scripts
This CL implements a slightly altered compilation process for `dart
compile` on MacOS. Instead of the traditional approach of
concatenating a dart snapshot with the dart runtime, this new
implementation uses a new MachO segment to store the snapshot. Doing
so ensure users can properly sign the resulting binaries.

The dart runtime has also been updated to look for the snapshots in
this new segment.

There are new unit tests ensuring the dart runtime can correctly
identify MachO-formatted executables and an end-to-end test ensuring
`dart compile` produces code that has the new segment and produces
code that can be signed.

TEST=pkg/dartdev/test/commands/compile_test

Change-Id: Ibdce80455e02bc2b6fd345d80be8d75f989a9c28
Cq-Include-Trybots: luci.dart.try:analyzer-mac-release-try,dart-sdk-mac-arm64-try,dart-sdk-mac-try,pkg-mac-release-arm64-try,pkg-mac-release-try,vm-kernel-mac-debug-x64-try,vm-kernel-mac-product-x64-try,vm-kernel-mac-release-arm64-try,vm-kernel-mac-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228080
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2022-03-09 18:02:34 +00:00
Ben Konyi 942a2f03a3 [ CLI ] Add support for --define/-D to dart compile jit-snapshot
Fixes https://github.com/dart-lang/sdk/issues/48447

TEST=Added to compile_test.dart

Change-Id: I2435a9933ee16da0e9b25de4a53e464872b4b16e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235162
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-03-03 19:22:30 +00:00
Ben Konyi ed48a944d0 Update create_integration_test web test to bind to a random port for webdev
Fixes https://github.com/dart-lang/sdk/issues/48489

Change-Id: I551e6fa6eb63e7d3f5652cfa7547fcf7b70976ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234912
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2022-03-02 23:28:00 +00:00
Sam Rawlins ed68a37df7 Tidy code in dartdev
Just code I was tidying while investigating a dartdev bug. Complies
better with Effective Dart.

* https://dart.dev/guides/language/effective-dart/design#dont-redundantly-type-annotate-initialized-local-variables
* https://dart.dev/guides/language/effective-dart/design#avoid-abbreviations

Also restrict a utility function to accept a non-nullable String and
return a non-nullable String.

Change-Id: I465a320cbd4fe9f7625119e873f67425b4caf8e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-02-28 23:35:57 +00:00
Ben Konyi 1486443d6e Reland "[ CLI ] Attempt to execute samples generated by 'dart create' templates"
Adds missing `PUB_CACHE` entry to a couple of places where a new process
is spawned.

This reverts commit 7a7c36ab2f.

Change-Id: I198deeb29ab32ca325b4d918b36ab94609a17de1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227560
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-02-25 20:05:42 +00:00
Ben Konyi ee5837aa7a Revert "[ Service ] Update VM service message to not reference Observatory"
This reverts commit f9147d933e.

TEST=N/A

Change-Id: Idef34b70f1066ddf79d02588dfba7caeec443e7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234325
Reviewed-by: Dan Field <dnfield@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-02-24 18:32:14 +00:00
Michael Thomsen 2244be02e1 Simplify template names.
Also adds support for alternate template names,
so this is a non-breaking change as the older
template names still work.

xcodebuild/DebugX64/dart-sdk/bin/dart help create
Create a new Dart project.
...
Available templates:

         console: A command-line application.
         package: A package containing shared Dart libraries.
    server-shelf: A server app using `package:shelf`
             web: A web app that uses only core Dart libraries.
Change-Id: I81e981c065de2cbc967bf2f2020760886be8b074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232800
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2022-02-23 12:10:34 +00:00
Ben Konyi f9147d933e [ Service ] Update VM service message to not reference Observatory
See https://github.com/dart-lang/sdk/issues/46756

TEST=Existing

Change-Id: Ib71bf00d667369d7438a4547ae444951ec0979df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233504
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-02-18 20:53:52 +00:00
Devon Carew 554b001ad9 [dartdev] adjust the behavior of several 'dart doc' cli flags
Change-Id: I9efdd71da948b87b0fcbcd2b3e242647131462b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232120
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-02-10 18:55:41 +00:00
Ben Konyi 250173e60c [ CLI ] dartdev null-safety migration cleanup
Follow-up to https://dart-review.googlesource.com/c/sdk/+/229948

Change-Id: If5624638eeb629ea025ec04b6a11d23144ea43ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231741
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2022-02-04 19:23:40 +00:00
Devon Carew cc019ea118 [dartdev] have the 'doc' command default to documenting the cwd
Change-Id: Id1d0394f6ecc300d100d0269a8df4d1a519422cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230820
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-02-02 23:55:46 +00:00
Devon Carew 0571cfe655 [dartdev] turn on the prefer_single_quotes lint
Change-Id: I43c964c769a98ca4796e7172254835088adbc088
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230800
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-01-28 19:21:15 +00:00
Ben Konyi 1c571a12fa [ CLI ] Migrate package:dartdev to null safety
Fixes https://github.com/dart-lang/sdk/issues/47964

TEST=CQ

Change-Id: I4ee57bc5739835824b0052bd9470a0d52ccf161b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229948
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-01-26 21:16:49 +00:00
Michael Thomsen a0475234aa Adding a few more dartdoc flags,
needed to convert the bots to call "dart doc" rather than "dartdoc"

Change-Id: Id2cda151079dc4b279b0df8cf7ada364297adcb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228920
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2022-01-23 18:42:06 +00:00
Ben Konyi e557fef27d [ CLI ] Fix incorrect string in smoke_test.dart
Change-Id: Ic60b0010d97b138c6afaa2d3606f4e41598fc41b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229120
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-01-20 04:33:26 +00:00
Konstantin Shcheglov 6d5543e01b [analyzer] Update generated experiments
experimental_features.yaml was updated in
https://dart-review.googlesource.com/c/sdk/+/219789
but unfortunately the analyzer code wasn't regenerated.

This CL updates the generated files and adds capability of checking
consistency to the generator. A check of consistency is add next to
the check for consistency used in presubmit for the CFE counterpart.

Was: https://dart-review.googlesource.com/c/sdk/+/224520
Change-Id: I59be4335ee81743aca5dc48eaa0df278d64d3692
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229020
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-20 00:07:36 +00:00
Ben Konyi 0c2079561b [ DDS ] Handle case where requested DDS port is already in use
Instead of hanging with no output to the console, a useful error message
is output to the console before shutting down the VM process.

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

Change-Id: Ib37c0cdf8b1bae6f164abff4a3b3100e944d8a3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228961
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-01-19 22:43:37 +00:00
Ben Konyi 3b736b8460 [ package:dds ] Migrate package:devtools_server functionality under package:dds/devtools_server.dart
Will allow for us to remove dependencies on package:devtools_server in
various packages.

Change-Id: I055cc7bb05d5b4ce0071e3f88a71cb9596e76c74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228022
Reviewed-by: Kenzie (Schmoll) Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-01-18 22:42:05 +00:00
Alexander Aprelev f40b06a8ac [dartdev] Make directory cleanup more resilient on Windows.
Processes on Windows can take longer to exit, taking longer for directories they use to become available for deletion. Accommodate this potentially lengthy by trying several times to delete temp directories before failing the test.

Fixes https://github.com/dart-lang/sdk/issues/47700
TEST=run_test on Windows

Change-Id: Id73d6ba3ff981ed59c89ab833f5775eff5375ae6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226980
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-01-07 19:12:56 +00:00
Alexander Aprelev eb4eade02a [vm/gen_snapshot] Avoid redundant compilation when generating kernel snapshot.
Fixes https://github.com/dart-lang/sdk/issues/39580
TEST=ci

Change-Id: I98e7201350433754c9ff1746e1d6e24b7107099e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225740
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-01-05 17:51:26 +00:00
Ben Konyi 7a7c36ab2f Revert "[ CLI ] Attempt to execute samples generated by 'dart create' templates"
This reverts commit e59f59d49a.

Reason for revert: Causing timeout failures on pkg-{mac,win}-release

Original change's description:
> [ CLI ] Attempt to execute samples generated by 'dart create' templates
>
> Fixes https://github.com/dart-lang/sdk/issues/47458
>
> Change-Id: Icf3c03c6d1f33ef9be30e4bf826813674e9e9fb7
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220883
> Reviewed-by: Devon Carew <devoncarew@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

TBR=mit@google.com,devoncarew@google.com,bkonyi@google.com

Change-Id: Id27c1f9ec124dad8556e1733220284180302b30e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226561
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-01-05 17:43:15 +00:00
Ben Konyi e59f59d49a [ CLI ] Attempt to execute samples generated by 'dart create' templates
Fixes https://github.com/dart-lang/sdk/issues/47458

Change-Id: Icf3c03c6d1f33ef9be30e4bf826813674e9e9fb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220883
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-01-04 17:48:56 +00:00
Ben Konyi 78b7fc5ac1 [ CLI / Gardening ] Wait for process to exit before cleaning up test
directory

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

Change-Id: Ifc0783409bdea308ba861f8021489ea8e58022c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224080
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-12-15 01:13:15 +00:00
Michael Thomsen 7da2117892 Initial 'dart doc' developer command
Initial 'dart doc' command for the unified 'dart' developer tool,
over time replacing the exiting 'bin/dartdoc' tool.

This is a second attempt after the previous got reverted:
https://dart-review.googlesource.com/c/sdk/+/217980

The first attempt, which was already reviewed, is
in patchset 1.

Change-Id: Id9e0e572944ba032c32f3cebec579ab23d0df036
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220744
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-12-06 10:26:09 +00:00
Ben Konyi c39b243435 [ CLI ] Avoid awaiting on join() calls in test harness
Fixes #47750

Change-Id: I179a9e987cea157257d40d6e840e9f4ff5539877
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221543
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-11-30 16:39:25 +00:00
Vyacheslav Egorov 71c9c2cd83 [vm] Remove support for non-bare AOT snapshots
Every AOT user out there has been using bare instructions mode
and continuing to maintaining non-bare instructions mode simply
adds costs (both in terms of time spent making changes to work
in a mode that is not used and CI resources spent on testing it).

This change removes FLAG_use_bare_instructions and changes the code
to assume that FLAG_precompiled_mode implies bare instructions.

TEST=ci

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,app-kernel-linux-release-x64-try,app-kernel-linux-debug-x64-try
Change-Id: I5032b13bfcb613f79865f2cfa139cca8d1b42556
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220964
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-11-24 13:03:52 +00:00
Brian Wilkerson 8fd4647032 Iterate until all fixable diagnostics have been fixed
Change-Id: Ibd8bcf36f7813fd39a2c3733ac2a933971a8cce9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221140
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-11-23 18:23:01 +00:00
Ben Konyi 2408d38878 [ CLI / Gardening ] Kill test subprocesses before deleting directories
Previously, if a test timed out and the `tearDown` callback was invoked
to cleanup the temporary project, we would try and cleanup the temporary
directory even if the subprocess hadn't exited. This works fine on most
platforms, but causes an exception to be thrown on Windows as the
subprocess still holds a handle to the temporary directory. Ensuring the
subprocess is killed before deleting the temporary directory will
prevent us from encountering errors on cleanup on Windows.

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

Change-Id: I71599908c31a1b32afed15c1388d228618462506
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220641
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-11-19 21:14:28 +00:00
Michael Thomsen 5075cb7a50 Revert "Initial 'dart doc' developer command"
This reverts commit 916a43a1c8.

Reason for revert: command fails in built SDK, see https://github.com/dart-lang/sdk/issues/47677

Original change's description:
> Initial 'dart doc' developer command
>
> Initial 'dart doc' command for the unified 'dart' developer tool,
> over time replacing the exiting 'bin/dartdoc' tool.
>
> Change-Id: Ib5639f9329bf5ed86375c97c5e485471934c56ff
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217980
> Commit-Queue: Michael Thomsen <mit@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>

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

Change-Id: I5eb04c68cb80b1e2b95642e9e7904ad86c603315
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220006
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2021-11-11 15:39:43 +00:00
Michael Thomsen 916a43a1c8 Initial 'dart doc' developer command
Initial 'dart doc' command for the unified 'dart' developer tool,
over time replacing the exiting 'bin/dartdoc' tool.

Change-Id: Ib5639f9329bf5ed86375c97c5e485471934c56ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217980
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-11-09 21:27:53 +00:00
Sigurd Meldgaard 86b7480b8c Start a new analytics session for each dartdev run
Change-Id: I0deb0ed7834361506ca6f67d5a8a77d40ea286a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218643
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Auto-Submit: Sigurd Meldgaard <sigurdm@google.com>
2021-11-01 20:46:11 +00:00
Ben Konyi 4de9e805ed [ CLI ] Don't resolve paths as URIs for known SDK artifacts
Handles cases where the SDK is installed on a path which includes
percent encoded characters. The OS doesn't decode these characters, so
decoding them before trying to load a snapshot with said characters in
their path will result in files not being found.

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

TEST=pkg/dartdev/test/regress_46364_test.dart

Change-Id: I5f78e8a2049cc0c83555528fcc8f41be946141f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218082
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-10-27 16:34:00 +00:00
Sigurd Meldgaard ecc6ed1b32 Send resolution analytics from dart pub get/upgrade/...
Also enables batched analytics (up to 20 events will be sent together in
one request if they are all issued before control is returned to the
async queue).

Change-Id: Ic23429d4981bc33a34cb19ffc00affdd09dfe511
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217014
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2021-10-25 12:35:30 +00:00
Ben Konyi bd067153d5 [ CLI ] Hide exe and aot-snapshot subcommands from dart compile on IA32
The AOT runtime is not supported on IA32, so generating snapshots and
executables requiring the AOT runtime is not possible on IA32.

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

TEST=pkg/dartdev/test/commands/compile_test.dart

Change-Id: I99e9a16f6a93b3b63b8ed15acc1472f9ca619c08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213680
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-09-24 01:21:08 +00:00
Danny Tuppeny b68ccc9a39 [dartdev] Add a "dart debug_adapter" command to run the DAP server from DDS
Change-Id: Icf4442929f848f7f927e84c999f09206e3fd0704
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213640
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-09-17 16:09:49 +00:00
Ben Konyi 123950ffa9 [ CLI / VM ] Add support for disabling DDS
Allows for tooling (e.g., DAP) to spawn their own DDS instance without
having to disable the CLI.

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

TEST=pkg/dartdev/test/commands/run_test.dart

Change-Id: Ie9a4832d424edae67f32560399d3b0a6ca9f1dc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213660
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-09-16 20:31:45 +00:00
pq dd35db6192 "master->main" migration
Change-Id: I773e0a60a782f9e6678cea22e2a7d8fae48cffa3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212869
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-09-09 18:14:36 +00:00
Konstantin Shcheglov f726874678 Support for --cache in 'dart analyze'.
Bug: https://github.com/dart-lang/sdk/issues/45267
Change-Id: I503227ac59a3562e79d3654c405debaf5d0c764c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-03 18:43:08 +00:00
Konstantin Shcheglov 78ef2cc217 Support for --packages in 'dart analyze'.
Bug: https://github.com/dart-lang/sdk/issues/45267
Change-Id: I660de0c80e4f280996b6ce5e90d39aa274997d07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212380
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-09-03 01:46:25 +00:00
Sigurd Meldgaard ae81cd5dab Deprecate top level pub.
Also makes the `pub` shell script (and its .bat counterpart)
forward to a `dart __deprecated_pub` command that implements the
old top-level.

This allows us to get rid of pub.dart.snapshot saving ~15 MB in a
unzipped sdk.

The reason for not forwarding directly to `dart pub` is that the
interface is slightly different (for example there is no `dart pub --version`).


The only new commit in pub is: `3c2ce330 Expose toplevel as a command`


Bug: https://github.com/dart-lang/pub/issues/2736
Change-Id: I6eb08d120c4844b3a12bc29544df6a868cd6fcc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210582
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2021-08-24 08:34:58 +00:00
Devon Carew d7c8e6a9d3 rev the build of devtools; add a 'dart devtools' command
Change-Id: I98ffbceedd06b3693703518243e231d6a1a66c9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210423
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
2021-08-20 16:25:24 +00:00
Ben Konyi d2855e703e [ CLI ] Default to printing CLI usage message instead of VM usage
--disable-dart-dev disables this behavior.

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

TEST=pkg/dartdev/test/commands/flag_test.dart

Change-Id: I46b91abc89fc3ec5e06fa7e9aad3939573cff545
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209264
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-08-13 23:01:51 +00:00
Ben Konyi cccc0293c5 [ VM ] Send 'dart --help [--verbose]' output to stdout
This is consistent with the majority of other tools and the CLI
behavior.

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

TEST=pkg/dartdev/test/commands/flag_test.dart

Change-Id: I45a3ddc9728e9cc1a273d4d5f11db74cb8104745
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204661
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-08-06 16:06:05 +00:00
Jaime Wren 1689a82229 Fix for https://github.com/dart-lang/sdk/issues/46509, modifying the order that dart analyze outputs the analysis error output.
This change also adds tests for the comparison sorting.

Bug: https://github.com/dart-lang/sdk/issues/46509
Change-Id: Ie568a75c25d0a1e1f76f26f4955de92599f3a68b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208521
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2021-08-02 17:03:22 +00:00
Jaime Wren 58969783ba Add two Functions to dartdev to allow the extension of cli tool.
Change-Id: I84e89d2c5404949a5b4aa27c17ea793a5cc92531
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208480
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-07-30 21:32:58 +00:00