Commit Graph

302 Commits

Author SHA1 Message Date
Ben Konyi ffe1c532e5 Revert "Resolve package pubspec of target for relevant dartdev commands"
This reverts commit 645511d7f4.

Reason for revert: Deemed too risky to land so close to the release branch cut
Original change's description:
> Resolve package pubspec of target for relevant dartdev commands
>
> Adds a `--no-pub` flag to those commands
>
> Bug: https://github.com/dart-lang/sdk/issues/50422
> Change-Id: I949605c4ebb4c609eb19159625958317e54523a9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291500
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Jonas Jensen <jonasfj@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>

Bug: https://github.com/dart-lang/sdk/issues/50422
Change-Id: I465e43c59240e545658dce2e3fd764755d55ca97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293560
Auto-Submit: Ben Konyi <bkonyi@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2023-04-05 00:43:54 +00:00
Sigurd Meldgaard 645511d7f4 Resolve package pubspec of target for relevant dartdev commands
Adds a `--no-pub` flag to those commands

Bug: https://github.com/dart-lang/sdk/issues/50422
Change-Id: I949605c4ebb4c609eb19159625958317e54523a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291500
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2023-03-31 14:03:31 +00:00
Sigurd Meldgaard fcf60089fd Allow dart run --packages=... and dart --packages=... run
This forwards any `--packages` flag from before a dartdev command name to dartdev, so also eg. `dart --packages=... compile` will now work as expected.

And commands that don't take a --packages flag will complain (eg `dart --packages=... devtools`.

Change-Id: I0448b97aae394cb94541cfa087a6d28908e480e5
Tested: <Tested via pkg/dartdev/test/commands/run_test.dart>
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292020
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2023-03-30 13:50:09 +00:00
Nicholas Shahan 7c0e4d67c7 [dart2js] Prevent unsound compiles
- Remove unsound platform .dill files from the packaged SDK.
- Throw and error referencing the sound null safety requirements of
  Dart 3 when compiling with `--no-sound-null-safety` and an unsound
  platform .dill file is not found.

Change-Id: I703a446e3e92c76a6b48168577fc0161eea83854
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289280
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-03-28 21:31:27 +00:00
Sigurd Meldgaard d5da8dc67d Improve dartdev testing
* Auto-dispose the TestProject (several instances were never disposed)
* Don't rely on package:test by default from the test-project.

Change-Id: I383eb36cbacb341b702f42075af562d20a2be45d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291069
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2023-03-27 14:52:23 +00:00
Zach Anderson fa0c81efe1 Revert "Reland "[ Observatory ] Disable serving Observatory by default""
This reverts commit fb1516c4ea.

Reason for revert: https://github.com/flutter/flutter/issues/123516

Original change's description:
> Reland "[ Observatory ] Disable serving Observatory by default"
>
> This reverts commit 5a8ddc0756.
>
> Reason for reland: fix for failing Flutter test landed upstream
> in https://github.com/flutter/flutter/pull/122419
>
> TEST=pkg/dartdev/test/commands/run_test.dart
>
> Change-Id: I1152296828428e118ccba11025f25f6b1dbbb0f3
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290921
> Reviewed-by: Zach Anderson <zra@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

Change-Id: I4e35f93ef4ac46c6dbd905903496a27107eb8329
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291180
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-03-27 14:42:01 +00:00
Sigurd Meldgaard cc9526fea8 Use platform based path separator in test
Change-Id: I750b236a39bc9338c84a2a6bf1fcfcde1de1aac4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291070
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2023-03-27 09:39:19 +00:00
Sigurd Meldgaard 9e5ba648af Bump pub to 8434b40d6a21dece68c4880e59dbdedfbd6bd7e5
Changes:
```
> git log --format="%C(auto) %h %s" 4bd757c..8434b40
 https://dart.googlesource.com/pub.git/+/8434b40d Be more quiet when doing implicit pub get (3847)
 https://dart.googlesource.com/pub.git/+/29a7c099 Dependency services: preserve pub.dartlang.org in lockfile (3846)
 https://dart.googlesource.com/pub.git/+/41963ddd Api entrypoint for ensuring resolution is up-to-date (3844)
 https://dart.googlesource.com/pub.git/+/92f6bf79 If pinned to an exact version, keep the pin when bumping (3736)
 https://dart.googlesource.com/pub.git/+/c68939ba Add missing closing quote in dependency override example (3843)
 https://dart.googlesource.com/pub.git/+/0cdeb85f Hint if version is not an incremental update (3840)
 https://dart.googlesource.com/pub.git/+/c795dcd8 Upgrade language version to 3.0 (3822)

```

Diff: https://dart.googlesource.com/pub.git/+/4bd757ce1dad04035fb0dbc6156879af23d8b3b8..8434b40d6a21dece68c4880e59dbdedfbd6bd7e5/
Change-Id: Ia0b7e8742522904454c318a381f983398be82838
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291066
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2023-03-24 17:17:15 +00:00
Sam Rawlins fd4602f019 Bump linter to include deprecated_member_use_from_same_package
We also stop reporting
`HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE` and
`HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE_WITH_MESSAGE`
as these are now replaced by the new lint rule.

The biggest change here is in the DEPRECATED_MEMBER_USE tests,
as most of these tests have
`DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE` reported (since it's
easier to write tests with files in one package). We move all
of those tests to `DEPRECATED_MEMBER_USE` tests, without losing
coverage.

Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: I7cada44265cd0e1e47ab77d4354de9a5571db614
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289444
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2023-03-24 16:35:37 +00:00
Ben Konyi fb1516c4ea Reland "[ Observatory ] Disable serving Observatory by default"
This reverts commit 5a8ddc0756.

Reason for reland: fix for failing Flutter test landed upstream
in https://github.com/flutter/flutter/pull/122419

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

Change-Id: I1152296828428e118ccba11025f25f6b1dbbb0f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290921
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-03-24 13:25:30 +00:00
Ben Konyi 27171f2d73 [ CLI ] Print unnecessary experiment warning to stderr instead of stdout
Fixes https://github.com/dart-lang/sdk/issues/51820

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

Change-Id: I6c3f31806e466b594776aa93062addc1ced4dc20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290621
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-03-22 20:55:36 +00:00
Parker Lougheed cdc782e57b Use caret syntax for SDK constraint in dart create templates.
This has been allowed since https://github.com/dart-lang/pub/commit/06ab0148b6b320b4bfc69b0adba028dd745268ef.

Change-Id: Ibd202c7ed93dc147ead4fb58030c44f0a00ab352
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289900
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-03-21 14:51:43 +00:00
Janice Collins 68353d76a4 Add a flag to disable the new unified_analytics for a single session.
- Adds a new flag, `--suppress-analytics` to the `dart` command to
  disable both the unified and the legacy analytics for a single
  session while deprecating the existing flag, `--[no-]analytics` used
  for disabling the legacy analytics on a single pass.
- Pipelines the flag from `dart` through `dart analyze` and `dart fix`
  to the execution of the analysis server.
- Updates all applicable uses of `dart analyze`, `dart fix`, and the
  analysis_server binary entry points in the SDK to disable analytics
  for the test infrastructure.

Bug: https://github.com/dart-lang/sdk/issues/49445
Change-Id: I1302cad7e04b21454aa7d9e8ee72a876b231377d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287661
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2023-03-16 18:00:57 +00:00
Janice Collins 18a99b3536 Fix path matching for windows in analyze_test.dart.
Change-Id: I7afa9d7b9f13e78df373e214801e6716963870b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288544
Auto-Submit: Janice Collins <jcollins@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-03-15 16:35:41 +00:00
Ben Konyi d8c1da97b5 [ CLI ] Update test expectations for 'dart test'
Follow up to https://dart-review.googlesource.com/c/sdk/+/288827

Change-Id: I982fb5cefe63fead4600722f8332635138c5777d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288920
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-03-15 14:25:24 +00:00
Derek Xu 50dd8edb7a [CLI] Add help message about --timeline-recorder to dart run --help
TEST=manual testing, CI

Change-Id: I11746e106c44bcef202f6002e10aa6e29381addb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288582
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-03-14 18:00:43 +00:00
Derek Xu d76ae6dbcb [CLI] Fix handling of --timeline-streams when it is supplied after dart run
--timeline-streams has been listed in the "options implied by --observe"
section of the dart run help messages, but it has been getting ignored.
This CL fixes that problem.

TEST=manual testing, CI

Change-Id: Ib6c2425a2681b61375df186673e0f195e3fae580
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288581
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-03-14 18:00:43 +00:00
Janice Collins 5b3f387f4d Make dartdev test_all.dart test all and work.
This corrects some tests that just weren't working for myself and
others while disabling a small number that don't work anymore or
are blocked on a bug.

Bug: https://github.com/dart-lang/sdk/issues/51707
Change-Id: Ib537d210e80baa3bb80578f0fcccc063a2029173
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288623
Auto-Submit: Janice Collins <jcollins@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2023-03-14 16:19:08 +00:00
Siva Annamalai 5a8ddc0756 Revert "[ Observatory ] Disable serving Observatory by default"
This reverts commit edead9cfd1.

Reason for revert: We have some flutter framework tests that are breaking, "flutter test should respect --serve-observatory". This will apparently be fixed when https://github.com/flutter/flutter/pull/122419 lands.

Original change's description:
> [ Observatory ] Disable serving Observatory by default
>
> Observatory can still be enabled by providing `--serve-observatory` or
> invoking the `_serveObservatory` private service RPC via web socket or
> HTTP.
>
> Related to https://github.com/dart-lang/sdk/issues/50233
>
> TEST=pkg/dartdev/test/commands/run_test
>
> Change-Id: I89b000e69bb31c91a9a5386fed1ee590cdafa58c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287821
> Reviewed-by: Michael Thomsen <mit@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

Change-Id: I994c86cbca9d0eb25e1f9adddeede94c227acad9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288601
Commit-Queue: Siva Annamalai <asiva@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Zach Anderson <zra@google.com>
2023-03-14 00:46:59 +00:00
Ben Konyi edead9cfd1 [ Observatory ] Disable serving Observatory by default
Observatory can still be enabled by providing `--serve-observatory` or
invoking the `_serveObservatory` private service RPC via web socket or
HTTP.

Related to https://github.com/dart-lang/sdk/issues/50233

TEST=pkg/dartdev/test/commands/run_test

Change-Id: I89b000e69bb31c91a9a5386fed1ee590cdafa58c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287821
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-03-10 16:01:41 +00:00
Jake Macdonald 737b6f7356 [flip-modifiers]: flip the flags for sealed classes and class modifiers
Includes several updates to tests that needed to land with this flip, as well as some other tests that needed to be updated and could land separately, but are being included here to expedite things.

Removes some unnecessary experimental release versions, as well as bringing up to date the generated files, which were previously out of sync with the yaml file.

TEST=bots

Change-Id: I71a86d7a86190069b504bd27d687f62b97a7251e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285080
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-03-10 05:27:57 +00:00
Ben Konyi a569f4a540 [ CLI ] Lockdown --no-sound-null-safety in dart compile subcommands
Related to https://github.com/dart-lang/sdk/issues/51513

Change-Id: Ie798af562133b933a76351b9e7244870ea49e6dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285380
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-02-24 20:27:03 +00:00
Ben Konyi 5ee55a8b6d [ CLI ] Rename compile-server-shutdown to compilation-server with start and shutdown subcommands
This will make compilation server related commands more consistent with
other commands in the CLI.

In order to make use of the compilation server for faster runs, users
will still need to pass `--resident` to `dart run` until we decide if we
want this functionality made more visible.

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

Change-Id: If9855ce1cc614c1c3ea6c4426dd4fad8f45c2495
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284500
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2023-02-22 20:40:48 +00:00
Devon Carew 39603fd3d0 [dart fix] remove a check that a lint code was enabled when performing a bulk fix
Bug: https://github.com/dart-lang/sdk/issues/51427
Change-Id: I67ae94d626d16ac831996b1ce4da626afcfccd56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283462
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-02-17 00:58:41 +00:00
Janice Collins 4552deb188 Make --dry-run and --validate-options conflict in dart doc.
Bug: dart-lang/dartdoc#3330
Change-Id: I6a40317c6bab90aa4126b92dbe1a852e3f946b29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282811
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-02-14 17:05:38 +00:00
Devon Carew 2ed6ea2900 [pkg/dartdev] fix an issue parsing ps output on some locales
Bug: https://github.com/dart-lang/sdk/issues/51385
Change-Id: Idb4bfed8d8d8408cdbde90832435189d0ca68562
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282805
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-02-13 22:40:43 +00:00
Sam Rawlins 42402bf433 [analyzer] Move 6 more Hints to be Warnings, MISSING_*
Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: Ie021ab23c4954c99ccb3f697302cada07b11cbf0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282164
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-02-13 16:32:26 +00:00
Sigurd Meldgaard a561e86a3f Better experiment handling in dart run
This change enables

dart run --enable-experiment :main # When using the package:binary
syntax

This is done by disabling snapshotting when experiments are enabled. We don't have a mechanism for invalidating snapshots based on the set of experiments.

And

dart run --resident main.dart # When using the resident compiler.

Here the issue was that the experiments was passed in a wrong format to the resident compiler process.

Bug: https://github.com/dart-lang/sdk/issues/51300 https://github.com/dart-lang/sdk/issues/51303
Change-Id: Id730e83bac83da9d678df36ae8ffd6e4ee44e8a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282281
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2023-02-13 10:01:18 +00:00
Devon Carew 0ffd41f53b [dart fix] tweak the 'To fix an individual diagnostic' messages
Add a blank line between the individual diagnostics and the 'fix all' message.

Change-Id: I8dcc385c8a76764f4c87c061e193d676990d2e4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281944
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-02-09 19:00:14 +00:00
Anna Gringauze b6bcdeaa5f [dartdev] Fix webdev integration test
Closes: https://github.com/dart-lang/sdk/issues/51106
Closes: https://github.com/dart-lang/sdk/issues/51037
Change-Id: If88b3e800764dbf0be4e294dc996fa2bc74be1f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280561
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2023-02-04 01:05:45 +00:00
Josh Soref 77978889eb Spelling
Closes https://github.com/dart-lang/sdk/pull/51143

GitOrigin-RevId: 9e21c99a222d588e4fc95980725a2f8c9784965c
Change-Id: If0870e8936c7649935dce7e23cd783d62aa5610c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279916
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-01-30 18:29:59 +00:00
Ben Konyi a1f64f41f5 [ VM Service ] Add _serveObservatory private RPC
Allows for VM service clients to tell the service to serve Observatory
at runtime. This will enable `flutter attach` to enable Observatory when
connecting to an existing Flutter application that is not serving
Observatory.

TEST=run_test.dart

Change-Id: Iae20b603c15bdb1d3f6d4b9b07d98638abfe2d00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278941
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-01-12 19:38:02 +00:00
Ben Konyi 76097a9e47 [ Service ] Don't redirect HTTP VM service requests when Observatory is not being served
Users should still be able to make direct HTTP requests to the VM
service, even if Observatory is disabled. For example:

GET http://127.0.0.1:58606/1aeHA80oCk8=/getVM

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

Change-Id: I5cb7962cc23f9c2bf4209ee0acd51c44ee56083b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278670
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-01-10 20:47:50 +00:00
Brian Wilkerson 14ff1f2d35 Generate a diagnostic for language overrides prior to 2.12
Change-Id: Ia10cf89443208ef133dd1ce8d68ee7c6b4129fbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276800
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-01-10 05:27:48 +00:00
Paul Berry 5d7b701d12 Remove dart migrate command.
Bug: https://github.com/dart-lang/sdk/issues/50319
Change-Id: I216a20afe8382eab5872672b2e01ed1daf7ac78d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278367
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2023-01-06 17:21:35 +00:00
Josh Soref 50b94ef9fc Spelling runtime bin
TEST=build VM

Closes: https://github.com/dart-lang/sdk/pull/50862

GitOrigin-RevId: ae54b37666f70f670ee3af11c984c7e9a7e9da26
Change-Id: I459fda0439a1cd368f488a70d84ee6bb915e60bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277761
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-01-06 07:48:22 +00:00
Jens Johansen fa88e0c91f [analyzer] Add benchmarks of running dart analyze
This CL:
  * Adds a benchmark of running `dart analyze` on a single small file.
  * Adds a benchmark of running `dart analyze` on a single project.
  * Adds a benchmark of running `dart analyze` on several projects.
  * Adds a hidden flag to `dart analyze` so it reports ram usage:
    run via `dart analyze --format=json --memory` and the memory
    usage will be reported in the json output.

All the bencmarks run without and with cache for speed testing, and
without and with cache when measuring memory usage.

The idea of running this via `dart analyze` instead of running either
the script or the snapshot is to measure the "real world" speed which
could be different (although in practise it _does_ just run the
snapshot).

Future CL(s) should also add benchmarks for queries using the
language server.

Change-Id: Iad6d6d72c1a2ed18ab51d056b4914f8b6eb963e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-12-19 08:22:32 +00:00
Derek Xu 53d859f6b9 Revert "[VM/CLI] Remove dartdev.dill"
This reverts commit c09f790d37.

Reason for revert: CI failures

Original change's description:
> [VM/CLI] Remove dartdev.dill
>
> Incompatible VM flags will no longer break the CLI when running from an
> AppJIT snapshot, so the fallback logic is no longer required. This CL
> thus removes dartdev.dill and the fallback logic.
>
> Relevant past CLs: https://dart-review.googlesource.com/c/sdk/+/157601
> and https://dart-review.googlesource.com/c/sdk/+/178300
>
> Fixes https://github.com/dart-lang/sdk/issues/50504
>
> TEST=I tried running `out/ReleaseX64/dart --observe --sound-null-safety test.dart`
> and `out/ReleaseX64/dart --observe --no-sound-null-safety test.dart` and
> both worked.
>
> Change-Id: I5cdcfbccf71ec557964014fdb80733b4a7c76b4d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274520
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Derek Xu <derekx@google.com>

TBR=bkonyi@google.com,derekx@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I5117f990dfabf93f5a9bae56098831280845e84e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275181
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2022-12-13 15:28:19 +00:00
Derek Xu c09f790d37 [VM/CLI] Remove dartdev.dill
Incompatible VM flags will no longer break the CLI when running from an
AppJIT snapshot, so the fallback logic is no longer required. This CL
thus removes dartdev.dill and the fallback logic.

Relevant past CLs: https://dart-review.googlesource.com/c/sdk/+/157601
and https://dart-review.googlesource.com/c/sdk/+/178300

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

TEST=I tried running `out/ReleaseX64/dart --observe --sound-null-safety test.dart`
and `out/ReleaseX64/dart --observe --no-sound-null-safety test.dart` and
both worked.

Change-Id: I5cdcfbccf71ec557964014fdb80733b4a7c76b4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274520
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2022-12-12 18:02:47 +00:00
Sigmund Cherem e8906e65e7 [3.0 alpha][dart2js] No longer infer the null-safety mode from sources.
This prepares dart2js to default to sound null safety in Dart 3.0.

The compiler no longer infers the default mode based on the input
program, instead uses sound null safety unless
'--no-sound-null-safety' is specified.

On a separate change, we expect to remove the option of disabling
null safety.

Note: this change should also be reflected in the CHANGELOG, but
we've currently not included it to redeuce merge conflicts, as we plan
to land multiple 3.0-alpha changes in a short window of time

Change-Id: Id87498cc5976548ec89d1f36c60674b72406950a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270860
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-12-07 04:02:13 +00:00
asiva 606a64a743 [3.0 alpha][VM/Runtime] - Flip flag to make strong null safety the default.
- Flip flag to make strong null safety the default
- Remove code that auto detects null safety mode from source files,
  it is necessary to specify --no-strong-null-safety to opt out.
- Retains sniffing of AOT/JIT snapshots and kernel files to determine
  null safety mode, the opt out has to be done when generating these
  file.

TEST=ci

Change-Id: If2c9608eedb7c46d9c3cd85e261ee9640e0d28eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261140
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-12-06 04:04:23 +00:00
Alexander Thomas 7e0d92d69d [3.0 alpha] Bump version to 3.0.0
Tested: Standard CQ.
Bug: https://github.com/dart-lang/sdk/issues/49529
Change-Id: I329b9940db7309c7e48f17eecd7a66d5b853a484
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271922
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-12-06 02:40:36 +00:00
Devon Carew 793367c498 [pkg/dartdev] add windows support for 'dart bug'
Change-Id: Id94a4d9e4a485350cbe37f78d5395e093ccf5892
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272741
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-11-30 20:13:05 +00:00
Daco Harkes eba9ada49e [pkg/dartdev] Fix bug_linux_test
Makes test pass when there's snapshots in the current processes.

Makes test pass when there's more digits in the Memory column, the
header is aligned right.

Closes: https://github.com/dart-lang/sdk/issues/50583
Change-Id: Ia0445c38795b60a403b8cba26c0444e829955973
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272820
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2022-11-30 11:06:51 +00:00
Devon Carew 1dd71b412f [dartdev] contribute a 'dart bug' command
Change-Id: Ib5557711df23d3a3e0485378c04ff6264194717f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269750
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-11-29 16:58:58 +00:00
Ben Konyi 3602351df0 [ VM Service ] Add support for '--[no-]serve-observatory'
To prepare for the eventual removal of Observatory, we plan on disabling
Observatory by default while providing an escape hatch to manually serve
the tool for some period of time before completely removing Observatory
from the SDK. This change adds flags that can be used to configure
whether or not Observatory is served.

Currently, '--serve-observatory' is the default behavior, but will be
changed to '--no-serve-observatory' once tooling is ready to support the
escape hatch behavior.

Part of https://github.com/dart-lang/sdk/issues/50233

TEST=run_test.dart

Change-Id: Ib6d1e1587d9fbd3c61d4a4c75d90635052835844
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267720
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-11-21 17:47:31 +00:00
Devon Carew 8e70a02f05 [dartdev] updates to the 'dart compiler-server-shutdown' command
Change-Id: I38c268dace6610083051f9ec62fc9c0846d202d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270023
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-11-16 21:14:41 +00:00
asiva 1a3215fc03 [kernel-service] Fix test (build breakage)
TEST=ci
Change-Id: I3bf933aed20ab6c964a17e4f8a6cda4920069196
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268802
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2022-11-10 17:01:13 +00:00
asiva 47880ca5f7 [kernel-service] - Send diagnostics output to stderr
TEST=ci

Bug:49881
Change-Id: I732d8e0f79a48ad4993762ec93c45dc22ee828b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268102
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-11-09 19:32:28 +00:00
Daco Harkes 34628cf00f [test/dartdev] Clean up tests
* Move `project in current directory` into a seperate invocation in a
  temp folder.
* Give an eager and more sensible error message if tests are run with
  a `dart` not in `bin/dart`.

Closes: https://github.com/dart-lang/sdk/issues/50352
Change-Id: I06b92a925f4e92c93b58bfc7f00197e15f0341de
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266901
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2022-11-01 17:26:08 +00:00