Commit graph

31 commits

Author SHA1 Message Date
Ben Konyi 76a74ba678 [ package:vm_service ] Migrate Observatory service tests to package:vm_service (Pt 1)
See https://github.com/dart-lang/sdk/issues/45037

TEST=pkg/vm_service/test/*

Change-Id: I20bfc03ae40bc41ee4d965a71f090ecf974e4e59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185522
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-11-05 17:04:07 +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
Joshua Litt 7ac9c46977 [dart2js_info] Fix tests after migration.
Change-Id: Idafa7d2ea308cf480fcbdac21b7ae5d783c81a32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210060
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-08-13 18:47:41 +00:00
Alexander Thomas df4f40e4ef [infra] Fix pkg/dart2js_info package-config.json exclusion on Windows
This is a follow-up to https://dart-review.googlesource.com/c/sdk/+/209900

Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-mac-release-try,pkg-win-release-try
Change-Id: Ic03c6d830727b377477b7780ab9dbf242c16d368
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209906
Reviewed-by: William Hesse <whesse@google.com>
2021-08-11 11:07:32 +00:00
Alexander Thomas 7fe597bd8e [infra] Exclude pkg/dart2js_info from package_config.json
pkg/dart2js_info will soon contain a checked-in version of dart2js_info
that will eventually replace third_party/pkg/dart2js_info. Until that
happens, pkg/dart2js_info should be ignored.

Change-Id: I337d69b6ee58b1ec0f436a199c81828dfd391ec8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209900
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-08-11 07:32:40 +00:00
Ben Konyi ba50910764 [ Presubmit ] Only update .dart_tool/package_config.json when package
contents don't match

Should reduce the frequency of trivial merge conflicts due to differing
times of the "generated" property.

Change-Id: I1f481d48be0aa21c923c63aedb7d9888d8618bcc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207503
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-07-20 19:51:50 +00:00
Ben Konyi 7250fd6379 Reland "[ package:dds ] Add null safety support"
This reverts commit b8c5ecd5aa.

TEST=N/A

Change-Id: I38bbebe1e38bc9dbfdde764eff847aafb3e39353
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200926
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-05-24 16:59:23 +00:00
Jacob MacDonald 0cbadee344 add the frontend_server_client package to the sdk
unblocks https://github.com/dart-lang/pub/pull/3008

Change-Id: I14ed70371001b0ca709469172afd2b97679a1e2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200920
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2021-05-20 17:44:35 +00:00
Emmanuel Pellereau b8c5ecd5aa Revert "[ package:dds ] Add null safety support"
This reverts commit a527411e51.

Reason for revert: depends on package 'devtools_shared' that is not yet migrated.

Original change's description:
> [ package:dds ] Add null safety support
>
> Fixes https://github.com/dart-lang/sdk/issues/45756
>
> TEST=service + DDS tests
>
> Change-Id: I6dd14d7f9fdee479a830c3b053dc3b00aa635202
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199800
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Devon Carew <devoncarew@google.com>

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

Change-Id: Icdaef3ac55d7ef302acd3f9c2538a41e52e4253a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200180
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2021-05-17 08:12:20 +00:00
Ben Konyi a527411e51 [ package:dds ] Add null safety support
Fixes https://github.com/dart-lang/sdk/issues/45756

TEST=service + DDS tests

Change-Id: I6dd14d7f9fdee479a830c3b053dc3b00aa635202
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199800
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2021-05-14 15:47:38 +00:00
Ben Konyi b99466d472 Reland "[ VM / DDS / CLI ] Add DevTools support to the standalone VM"
This reverts commit 5cbf10febe.

TEST=pkg/dds/devtools_observatory_connection_test.dart

Change-Id: I682d009f784b930094dae9b7d4e9a66efffb6ee8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198561
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-05-11 17:55:26 +00:00
Ben Konyi 5cbf10febe Revert "[ VM / DDS / CLI ] Add DevTools support to the standalone VM"
This reverts commit ef0e4ea107.

Reason for revert: Flutter HHH and golem builds are red. Rolls to Flutter are failing.

TEST=N/A

Original change's description:
> [ VM / DDS / CLI ] Add DevTools support to the standalone VM
>
> Example output on stdout when DevTools is enabled:
>
> Observatory listening on http://127.0.0.1:8181/CzkZzZaONW4=/
> The Dart DevTools debugger and profiler is available at: http://127.0.0.1:8181/devtools/#/?uri=ws%3A%2F%2F127.0.0.1%3A8181%2FCzkZzZaONW4%3D%2Fws
> hello world!
>
> vm-service: isolate(1674461414267555)  'main' has no debugger attached and is paused at exit.  Connect to Observatory at http://127.0.0.1:8181/CzkZzZaONW4=/ to debug.
>
> TEST=pkg/dartdev/test/commands/run_test.dart
>
> Change-Id: Icd1afda87ad4a46f228125d53094d10adf8056ec
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188361
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

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

Change-Id: I50e8dc4e592e13b44c2fb980b2029d5c5cc3ad2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198381
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-05-05 20:31:07 +00:00
Jacob MacDonald c5357614e4 add package config check to test_matrix.json
Change-Id: Icc8f55c3a58e6b81c3f3b4f34ff07c07d976afd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198382
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2021-05-05 18:37:45 +00:00
Ben Konyi ef0e4ea107 [ VM / DDS / CLI ] Add DevTools support to the standalone VM
Example output on stdout when DevTools is enabled:

Observatory listening on http://127.0.0.1:8181/CzkZzZaONW4=/
The Dart DevTools debugger and profiler is available at: http://127.0.0.1:8181/devtools/#/?uri=ws%3A%2F%2F127.0.0.1%3A8181%2FCzkZzZaONW4%3D%2Fws
hello world!

vm-service: isolate(1674461414267555)  'main' has no debugger attached and is paused at exit.  Connect to Observatory at http://127.0.0.1:8181/CzkZzZaONW4=/ to debug.

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

Change-Id: Icd1afda87ad4a46f228125d53094d10adf8056ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188361
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-05-03 18:24:09 +00:00
Nate Bosch 0485883d66 Add trailing newline to package_config file
Avoids spurious diffs in git when generating with the tool compared to
editing the file in an editor which may correct the missing newline.

Change-Id: If73928fef0682c32d728bae666ccaea4c2749890
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185497
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2021-02-19 00:12:49 +00:00
Leaf Petersen fe3cd179cf Add presubmit check for package_config.json .
Change-Id: Ida784b6e73601e0309e10b2808f46e70926eabc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183045
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-02-06 01:02:38 +00:00
Alexander Thomas c88171c8af [sdk] Bump version to 2.13
TEST=Presubmit tests and local builds
Change-Id: I1b15d60eced0cf3f422548eda75706609f6640cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182624
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-02-04 12:10:17 +00:00
Paul Berry a42244f73b Flow analysis: begin tracking non-promotion reasons.
This CL implements the core flow analysis infrastructure for tracking
reasons why an expression was not promoted.  It supports the following
reasons:

- Expression was a property access
- Expression has been written to since it was promoted

I expect to add support for other non-promotion reasons in the future,
for example:

- `this` cannot be promoted
- Expression has been write captured
- Expression was a reference to a static field or top level variable

These non-promotion reasons are plumbed through to the CFE and
analyzer for the purpose of making errors easier for the user to
understand.  For example, given the following code:

  class C {
    int? i;
    f() {
      if (i == null) return;
      print(i.isEven);
    }
  }

The front end now prints:

  ../../tmp/test.dart:5:13: Error: Property 'isEven' cannot be accessed on 'int?' because it is potentially null.
  Try accessing using ?. instead.
      print(i.isEven);
              ^^^^^^
  Context: 'i' refers to a property so it could not be promoted.

Much work still needs to be done to round out this feature, for example:

- Currently the analyzer only shows the new "why not promoted"
  messages when the "--verbose" flag is specified; this means the
  feature is unlikely to be noticed by users.

- Currently the analyzer doesn't show a "why not promoted" message
  when the non-promotion reason is that the expression is a property
  access.

- We need one or more web pages explaining non-promotion reasons in
  more detail so that the error messages can contain pointers to them.

- The analyzer and front end currently only show non-promotion reasons
  for expressions of the form `x.y` where `x` fails to be promoted to
  non-nullable.  There are many other scenarios that should be
  handled.

Change-Id: I0a12df74d0fc6274dfb3cb555abea81a75884231
Bug: https://github.com/dart-lang/sdk/issues/38773
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181741
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-02-02 16:15:34 +00:00
Robert Nystrom c4a1eaf4c7 Require an SDK constraint in the package config generator.
Also, fix the one package that didn't have one, and regenerate the
config.

Change-Id: Id7f210e9a3f73b2070e52df6ae9d4b1c4d4aeae3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172081
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2020-11-17 00:11:00 +00:00
Alexander Thomas 44f3881be6 [infra] Update checked-in SDKs to 2.12.0-0.0.dev
This is the first checked-in SDK with null-safety enabled by default.

Change-Id: I8f6fcdfd8856483f4737eb200ed4623a244cb0cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170085
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-11-05 07:53:22 +00:00
Robert Nystrom 9d570fe9cf Add tools/package_deps to package config generator and regenerate.
Change-Id: Ia84bba1fcbd1b04e557b3fd851f16b812e7170b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167905
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2020-10-17 02:10:14 +00:00
Leaf Petersen e9c0b2a1c2 Update package_config.json
Change-Id: I807f8eb6daf148bd3c69f3bfd10a44bb1c6353b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166801
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Auto-Submit: Leaf Petersen <leafp@google.com>
2020-10-09 20:02:57 +00:00
Johnni Winther e597681d22 [cfe] Update messages for failures to opt in to non-nullable experiment
Change-Id: I16d71feeb51a7eee13048195898adfe7bf5761d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157482
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-08-14 09:01:07 +00:00
jlcontreras ee1ee7ee15 [cfe] Add mixin tests and runtime tests for the value class feature
Change naming value classes -> value class

Change-Id: Ifab5e0be8b816192b5716fd3433afb721bd9394c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156881
Commit-Queue: Javier López-Contreras <jlcontreras@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-08-12 16:46:17 +00:00
Johnni Winther 9d279d41e3 Add pseudo-packages for _fe_analyzer_shared test data folders
Change-Id: I6995cd65b547f0dc6159c90acb194babb819c4ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156908
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-08-10 08:03:29 +00:00
Kevin Moore 3aa7484f6a Remove references to removed tools/gardening
Follow-up to 84ca34bf8b

Change-Id: I87d2bf0a77dc70f15a378a149dc95be6f33ee3c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147803
Commit-Queue: Kevin Moore <kevmoo@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Karl Klose <karlklose@google.com>
2020-05-12 18:42:30 +00:00
Johnni Winther dc0fcc7472 [tool] Update tool/generate_package_config to work on Windows
Change-Id: I39f69162857f1477df117e0c25601846ddd0a507
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147480
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-05-12 09:24:19 +00:00
Robert Nystrom 328f1be1fe Opt package:meta in to null safety.
This is done by setting the SDK constraint min version in the package's
pubspec to 2.9.0 which is the version that CFE currently uses to mean
"opt in".

However, the pre-built SDK currently checked into the repo can't handle
that version. To work around that, this CL has a gross hack to simply
omit the language version in the generated package config if the
pubspect's version is 2.9. This has the effect of telling CFE to use
the current language version, which is what we want, while also allowing
us to put the right SDK constraint in the package's pubspec.

Change-Id: I51c2952003c83b74fb6f3344c93839fbd267a3ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145020
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2020-04-28 03:54:48 +00:00
Robert Nystrom d9bb487ca8 Treat the expect and async_helper packages as opted in to NNBD.
This should enable strong mode tests to be fully NNBD opted in. At the
same time, legacy tests when run with the experiment off should
hopefully be able to still consume these libraries because they don't
actually use any NNBD features.

To do this, I changed the script that generates the SDK repo's package
config to not put in a language version for any package whose pubspec
has no SDK version. According to language versioning, that means the
package should be considered to be at the "current" version of the SDK
running the code.

In NNBD, that's opted in. With the experiment off, that is (presumably)
"opted out" in the sense that NNBD doesn't exist.

In order to *not* opt in some of the other packages that currently
lack SDK constraints, I put those in and pinned them to "^2.7.0" which
was what the package config script used to implicitly fill in for them.

I see a bunch of other changes in the generated package config too. The
update script probably hasn't been run in a while.

Change-Id: I55193d42eac0696a6b0105546551efa45a1f3252
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144305
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-04-27 21:04:56 +00:00
Johnni Winther d690a0c7c4 [cfe] Handle nullability of typedefs
Closes #41496
Closes #41498
Closes #41499
Closes #41501
Closes #41505

Change-Id: I425b6137f9ea41d01c95332ef1f7d43ca7afb5a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143811
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-20 07:03:55 +00:00
Robert Nystrom 4b7ba5a72f Add a script to generate a package_config.json for the SDK.
Also include the generated output.

Change-Id: Ic2818f544972c737f69913122e366ea48375e950
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135795
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2020-02-27 17:52:23 +00:00