Also updated non-migrated libraries to include @dart=2.10.
Change-Id: Idcf4e54f9aa37b9b016133144af594cc932418a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192122
Reviewed-by: Gary Roumanis <grouma@google.com>
This is part of a series of changes to add support for SDK expression eval tests.
This change:
* Adds SDK dependencies on webkit_inspection_protocol.dart and browser_launcher.dart
* Adds dev dependencies to DDC
Change-Id: I025a1f1b59e00858a33016818b6746c57c9caec4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190961
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
There are no formatting changes aside from adding support for generic
metadata annotations, which are not yet used. Changes are:
- Migrated to null safety.
- Return exit code from FormatCommand.run().
Change-Id: I8892f6551541f673b8e49045665e2371ba40b026
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191182
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Switch to syncing by revision to allow for syncing to google3 before
publishing.
Change-Id: I9db7b02b5602d185ae1b3dda47a95ea906ac261e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186422
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
Change-Id: I7eee376c991b9b9683e340dfecccdcb7668f4415
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185494
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Will allow for tests to be enabled in google3 as pub or portions of pub
are used to run VM tests.
Previously the test harness was configured to look for a URI with a data: scheme to determine if it was being run via pub run test (pub generates its own harness and spawns the test from that). We were parsing the test URI out of this data URI, which wouldn't work correctly in google3.
This change assumes that if Platform.script.scheme == 'data', the test is being run via pub from the root directory of the package. In that case, we can assume there is a 'test' directory and simply use 'test/$scriptName'as the path for the testee process.
TEST=N/A
Change-Id: I589605ebc7001adc9d8595ca8347c0af329b9c28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184541
Reviewed-by: Gary Roumanis <grouma@google.com>
paired with this so the sdk roll can succeed.
TEST=Fixes static errors
Change-Id: Ia4e325936ea81d0d51fbf6dd939b732860d22100
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183760
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
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>
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>
Change-Id: Icad23bbfc3ca91a3263192a6e98468de76cf76d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180440
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
See also cl/352876453
Change-Id: I8a68d97b8b04b5e38833e637b5dc0b54123acd35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180242
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Changes:
63f1110 Make argument to featureValueOf dynamic (#164)
71eeaee Make the item argument to Match dynamic again (#163)
2071cfd Add types to more parameters (#162)
5d52720 Allow null-safe code to do `same(null)`. (#161)
05db35c Delete .test_config (#160)
e8b4964 remove redundant experiment (#159)
48fe280 Bump SDK constraints for pub (#158)
225cc13 allow the 2.12 prerelease sdks (#157)
b9ce574 Prepare for the 2.11 dev SDKs (#156)
fe4e68a Update .travis.yml
Change-Id: I90c8d9d2f21d6454f1ace977deb9efec0d29d93d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177881
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Note that it uses package:analyzer that is not migrated yet, but is
being migrated. But it also uses package:html that we did not have
plans to migrate yet. Anyway, this CL will move us forward.
Change-Id: I6210c6baef8c20c0803a304d7bd99acc1f8ccd37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177200
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Some notes.
1. `Token.next` is `Token?` because there are null(s) for comment tokens.
But I think that it is never `null` in code, because there is at
least EOF token. So, lots of `!` null checks.
2. `Link.tail` is never null when `isNotEmpty`, but the type system
cannot express it. So, some number of `!` null checks.
3. I keep assert(s) for now, and use comment
`// ignore: unnecessary_null_comparison`.
4. I disabled `can_get_rid_of_nnbd_issue_error`, I think it fails
because of changes in `_fe_analyzer_shared` language version.
Smoke test in google3 looks green.
https://test.corp.google.com/ui#id=OCL:346825148:BASE:346841611:1607632317129:6e87bf7
I have not tried yet full TAP, will do in the evening.
I have not tried yet Golem, or looked at benchmarks.
Change-Id: I651301e5d3a851dd77d73af960dac779cb0fc991
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175620
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
This brings in the null safe migrated args. It also brings in a new
version of dart2js_info with a tiny change to make it compatible with
the new args.
Change-Id: I280d25c9d5d6bea974206996c5a8c232e728e81d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175020
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
This is a reland of 9906fabaa0
Original change's description:
> Roll the latest args package into the SDK repo.
>
> Change-Id: Ie464e5c01f34a101103d16ff108b6b9eb80fbd4b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174485
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Commit-Queue: Bob Nystrom <rnystrom@google.com>
> Auto-Submit: Bob Nystrom <rnystrom@google.com>
Change-Id: I5b7b041e02857114c257393cf9d560b6b8b03fd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174701
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
This reverts commit 9906fabaa0.
Reason for revert: Causes regressions in google3 (likely need internal CL to get new args package in third party), see https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/google/3073/overview
Original change's description:
> Roll the latest args package into the SDK repo.
>
> Change-Id: Ie464e5c01f34a101103d16ff108b6b9eb80fbd4b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174485
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Commit-Queue: Bob Nystrom <rnystrom@google.com>
> Auto-Submit: Bob Nystrom <rnystrom@google.com>
TBR=rnystrom@google.com,nbosch@google.com
Change-Id: I9d3091d1631a145cd8b37317cc2e381762e5a46a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174646
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
In preparation for some flow anaylsis work I intend to do this month,
I want to make the flow analysis unit tests easier to understand and
maintain. This CL creates an AST representation that models just
enough of the Dart language to be able to do flow analysis testing, so
that when reading or writing a flow analysis unit test, instead of
having to remember the correct sequence of calls to FlowAnalysis to
model a given construct, you can just create a mini-AST representation
of the given construct and pass it to the flow analysis test harness.
The mini-AST model for expressions contains methods that can be used
to build larger expressions out of smaller ones, so a lot of code can
be modeled compactly. For example, to create a mini-AST model of the
statement `x = y && z == null;`, call
`x.write(y.read.and(z.read.eq(nullLiteral()))).stmt`.
Change-Id: I11e3882078fdc5797176019398db48011232cf35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174560
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>