Commit graph

76380 commits

Author SHA1 Message Date
gaaclarke a4786e8f77 [vm] Update Dart_Initialize doc string for parameter
Closes https://github.com/dart-lang/sdk/pull/43964
https://github.com/dart-lang/sdk/pull/43964

GitOrigin-RevId: 7d803758ca60764423915b5319a12711d56808dc
Change-Id: I4b396673014735a44564ca7400632d01beafd112
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169582
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-11-02 11:00:32 +00:00
Matthew Lloyd 30ba97bb1b Fix remaining instance where DateTime accesses the private member _value
This does not work if the DateTime accessed is an implementation of
the DateTime interface, rather than an instance of the same class.

Related issues:

* https://github.com/dart-lang/sdk/issues/34962
* https://github.com/srawlins/timezone/issues/57

Related changes:

* https://dart-review.googlesource.com/c/sdk/+/81828

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

GitOrigin-RevId: 877ae83867a37c402ae5057471fa283eebd8891c
Change-Id: I91205292bb91d7958c4b3687135a8152d6ebbe6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151322
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2020-11-02 10:35:42 +00:00
Ming Lyu (CareF) 2613251b4d typo fix
Fix a spell typo

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

GitOrigin-RevId: 32c2b39492d6b1dc5a66c7d8f2f99a0230200cf0
Change-Id: I393e4ed66ed7c6a9aef5cac7ae3bcef15a0d0e55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159500
Reviewed-by: Michael Thomsen <mit@google.com>
2020-11-02 09:32:15 +00:00
Clement Skau 79ca2ef7b8 Clean-up: removes unused set_raw_async_stack_trace(..)
Change-Id: I37634839c5e9fe8ab9c81a4b7d387f78028e6268
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170081
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-11-02 08:37:22 +00:00
Brian Wilkerson 2ab3ebad9d Remove a duplicated error code
The parser produces this diagnostic, so analyzer doesn't need to.

Change-Id: I39e2ade681e5580b6ca5493a334d87d66f51e1ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170041
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-11-02 05:06:02 +00:00
Brian Wilkerson 98ba51c48e Improve the highlight range for ambiguous_export
Change-Id: I0c4f887ad467fa5e186ad34650816f15956f623f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170021
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-11-01 15:25:11 +00:00
Brian Wilkerson 3fe3a0384f Improve the highlight range for invalid_super_invocation
Change-Id: I8be664802f04def78304b7cc0e8481d734d295e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170040
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-11-01 15:24:51 +00:00
pq 3fde0ca43d linter 0.1.122
Change-Id: Ib551f019175dffe1473959ad91217ed97a8f34df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-10-31 13:40:53 +00:00
Alexander Aprelev da133e5047 [io/file_watch] Don't attempt to close already closed DirectoryWatchHandle.
Fixes https://github.com/dart-lang/sdk/issues/43941

TEST=Running four dart scripts in parallel that delete/watch thousands of file reproduces the failure after several minutes. After the fix it no longer reproduces.

Change-Id: I6a0a928838c676f44e747a822611b56f0ffc4841
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169601
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2020-10-31 01:39:33 +00:00
Konstantin Shcheglov 77f2019f00 Use the current SDK language version by default.
Change-Id: I317ad3858b0f023cdf2fd02a1a28a9c22742b74c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169960
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-10-31 00:20:22 +00:00
Konstantin Shcheglov 7dcb9bba3e Use the releaseVersion in errors for ExperimentalFeatures.non_nullable
Change-Id: I46a623601aee90f19ce1770cda3c8125ec2ef941
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169943
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-30 23:39:12 +00:00
Ben Konyi 7f723f4166 [ VM / CLI ] Fix issue where VM flags would be parsed from the option
list for a script.

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

Change-Id: I6f0860e0a43055aaab775a28baa660d60fb1c47e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169782
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-10-30 23:25:22 +00:00
Brian Wilkerson 195820ec10 Update the message for sdk_version_never and comment in previously reviewed docs
Change-Id: I505e4a577feecbb4deb25eaaeb863a80c7e71602
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170000
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-30 23:17:12 +00:00
Ryan Macnak c8dea19836 [vm, gc] Reserve some memory to use during handling of OutOfMemoryErrors.
This reserved space can only be allocated from after an allocation has failed from OutOfMemory, and once some portion of this space is used, refilling it is the first allocation performed after GC.

Also avoid greatly slowing down from ineffective scavenges as the memory limit is reached.

Bug: https://github.com/dart-lang/sdk/issues/43543
Bug: https://github.com/dart-lang/sdk/issues/43642
Bug: b/169880355
Change-Id: Ic7132cb34d7a7d13c67661f057f00dd74306251c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165862
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-10-30 23:07:22 +00:00
Brian Wilkerson 740857152a Fix the wording of a warning
Because this is only a warning the user can ignore it and the code will
compile and run without problem. Hence, the previous wording was a bit
strong.

Bug: https://github.com/dart-lang/sdk/issues/43189
Change-Id: Ibe4f048191b28230fede8e7e5d76943c5b56f31b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169962
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-30 22:57:32 +00:00
Alexander Markov bf968d5627 [Test] Remove vm/dart/il_round_trip_deserialization_test
This test was added a while ago during development of IL serialization
and deserialization (https://github.com/dart-lang/sdk/issues/36882),
which wasn't completed.

Since development of serialization/deserialization was put on hold,
this test was failing with a lot of flakiness, flipping between
Crash/Timeout/RuntimeError on unrelated changes (https://github.com/dart-lang/sdk/issues/43617,
https://github.com/dart-lang/sdk/issues/43359, https://github.com/dart-lang/sdk/issues/36882),
and even turning bots purple (https://ci.chromium.org/p/dart/builders/ci.sandbox/vm-kernel-precomp-nnbd-linux-debug-simarm_x64/32).

There are no signs that underlying problems with IL serialization/deserialization
are going to be addressed, but this test requires constant attention.
If implementation of https://github.com/dart-lang/sdk/issues/36882 is
ever resumed, it would be possible to resurrect this test from git history.

Closes https://github.com/dart-lang/sdk/issues/43617
Closes https://github.com/dart-lang/sdk/issues/43359
Closes https://github.com/dart-lang/sdk/issues/42441

Issue: https://github.com/dart-lang/sdk/issues/36882
Change-Id: I5a8789397efcb69ad30257077aee0a3e195c8a69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169940
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-10-30 20:59:22 +00:00
Konstantin Shcheglov d484a6f09f Remove support for experiments in Analysis Server options.
analysis_options.yaml should be used instead.

Change-Id: I02a03667d5de5c9e764e30ff3c77b8df6deaa221
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169941
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-30 20:46:02 +00:00
Konstantin Shcheglov 77a5f85dbf Simplify check for parameters DeprecatedMemberUseVerifier.
Follow up for https://dart-review.googlesource.com/c/sdk/+/169903

I believe inDeclarationContext() is unrelated and not necessary.

Using thisOrAncestorOfType() is cumbersome here, so I changed it
to iterating directily over parents.

Bug: https://github.com/dart-lang/sdk/issues/44004
Change-Id: I2ecd1d5833b4deaac8afcc8ac9a6a53c3eeb6f4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-30 20:32:32 +00:00
Brian Wilkerson be5446f700 Improve the location of a couple of diagnostics
Change-Id: I11e935b89d7e2a91a71b2fed162407d6bb2c2367
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169942
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-30 20:31:52 +00:00
Ryan Macnak 88fdb3ee68 Add tests for the identity of constants repeated in different loading units but not present in the main unit.
Bug: https://github.com/dart-lang/sdk/issues/41974
Change-Id: I29a00aa6139dc2a1f865f8c5f659169c84c8e45d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169790
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-10-30 19:16:42 +00:00
Sam Rawlins d0db3b1d23 Do not report @deprecated field formal parameters at their declaration.
Fixes https://github.com/dart-lang/sdk/issues/44004

Additionally, fix @deprecated parameters referenced in initializers.

Change-Id: Ibad9c3acaf3991c722bee95ecd58d3e3a04bb4cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169903
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-10-30 19:10:03 +00:00
Johnni Winther d70796bae8 [kernel] Add caching ability to StaticTypeContext
Dart2js is changed to use the caching scheme in preparation for dart2js
to use the static types computed by the CFE instead its own custom
static type computation.

Change-Id: I1d45eda2f67ce4b23d669ec49e476ee357b37fc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166845
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-10-30 17:55:21 +00:00
Brian Wilkerson 224a997a23 Remove the obsolete dartfix package
Change-Id: Icc986d6345e2867ca0f3e3863dff6b0418db8242
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169761
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-10-30 17:22:31 +00:00
Johnni Winther 5efe55abf7 [cfe] Fix missing case of using receiver type instead of bound
+ fix test to expect erasure of `S & int` to `S` also when bound is `dynamic`.

Closes #43591

Change-Id: I44cb4c726648d4065bdf89bb2dbf71b2753c6c84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169340
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2020-10-30 16:33:51 +00:00
Clement Skau f7e678d71d Nit: typo _asyncSet.. -> _setAsyncThreadStackTrace
TEST=None. It's a nit typo in a comment.

Change-Id: I80c1fc1c1dd59c3e841791b6134e4c06fd866358
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169886
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-10-30 16:16:45 +00:00
Erik Ernst 0cf3c37e9e Adjust tests verifying the static type dynamic
Change-Id: Icf229e3877ce646340b6dad1bd49c20110953d44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169885
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-10-30 16:10:30 +00:00
Konstantin Shcheglov 5d383959ce Fix crash when integerDivide and the result is not finite.
There are crashes logged internally.

Change-Id: I8e5705017f976891981389135b4713a13f824f46
Bug: https://github.com/dart-lang/sdk/issues/43997
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169861
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-30 16:08:40 +00:00
Vyacheslav Egorov 4b6f0f5c7b Revert "Require that all changes to VM have TEST line"
This reverts commit a2ceec3e25.

Reason for revert: presubmit hooks are run very early (before CL description is edited), which breaks common workflows.

Original change's description:
> Require that all changes to VM have TEST line
>
> All changes touching one of the following directories will after this
> change be required to contain TEST= line.
>
>     runtime/vm
>     runtime/bin
>     runtime/lib
>     runtime/include
>     runtime/observatory
>     runtime/observatory_2
>     runtime/platform
>     sdk/lib/_internal/vm
>     pkg/vm
>
> This line is supposed to describe in free form how change was validated,
> for example by listing existing or newly added tests.
>
> The goal behind this requirement is to remind both reviewer and change
> author that changes to the code base are in general expected to be
> covered by tests, especially when CL is addressing a regression which
> slipped through existing testing.
>
> Having TEST line in the description would allow both author and
> reviewer to take additional time to consider if validation was
> sufficient or additional test coverage is needed.
>
> The inspiration for this line comes from Chromium[1].
>
> [1] https://chromium.googlesource.com/chromiumos/docs/+/master/contributing.md#describe-testing-performed
>
> TEST=changed file in runtime/vm and run git cl presubmit
>
> Change-Id: Ie16cf7c14af18e3a22a17084c0aebb4d1dfd6d23
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169640
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=vegorov@google.com,kustermann@google.com,asiva@google.com

Change-Id: Ib2e198c322447e8d1166d5d05b2f3209d168f1e9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169887
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2020-10-30 15:28:41 +00:00
Mayank Patke a5afc3e974 [dart2js] Remove tests/dart2js/boolean_conversion_test.
The dart2js_2 version still exists.

Prior to null safety, it was legal to assign `null` to a `bool`, so
things like boolean operators and control flow constructs required
null checks on their inputs. `--omit-implicit-checks` removed these null
checks, so we had to specify what the behavior would be in these cases.
(In general, `null` was just treated as a falsey value, since that's
what happens in JS.)

With null safety, it is no longer legal to assign `null` to a
(non-nullable) `bool`, so the backend freely optimizes boolean
expressions under this assumption. It's possible to smuggle `null` in
via a cast to `dynamic` and an implicit downcast to `bool`. The downcast
ordinarily fails at runtime but can be removed with
`--omit-implicit-checks`. We do not want to specify the behavior in this
case. We do not guarantee the behavior under `--omit-implicit-checks` of
code which would have failed with checks enabled.

Maintaining the old behavior would likely require us to be pessimistic
about nullability and miss optimization opportunities.

Fixes: https://github.com/dart-lang/sdk/issues/43471
Change-Id: I7e8e7c66f777ef631ef4054a8dfe211e3e2bef55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169820
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-10-30 15:21:20 +00:00
Martin Kustermann 04105ec124 [vm] Fixes "nesting" support for SafepointRwLock implementation
Fixes https://github.com/dart-lang/sdk/issues/44000

TEST=vm/cc/SafepointRwLockExclusiveNestedWriter_Regress44000

Change-Id: I376198195164ab5f41b3e42138f204eaa934bd4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169882
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-10-30 14:15:10 +00:00
William Hesse 65b424b3fd Skip VM tests that hang on Windows
Three dart:io tests in the co19 suite are hanging, causing
test infrastructure failures. Skipping them until the problem is fixed.

BUG=https://github.com/dart-lang/sdk/issues/32138

Change-Id: I5102eef49bf094158535aa2b938930994d4df4dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169880
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-10-30 11:20:43 +00:00
Johnni Winther 9cd13cdaee [cfe] Add test for issue42607
This verifies that we no longer emit spurious errors/warnings in opted out
libraries when trying to compile with sound null safety.

Closes #42607

Change-Id: I89063003fb5140d9cd0a3ce937017976e2fdd1c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169740
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-30 09:58:01 +00:00
Karl Klose 5cc2ca1ccf Fix typo in list.length= method comment
Change-Id: I35457f926446c9b77c34d7b2a967b6d9076ba055
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169841
Auto-Submit: Karl Klose <karlklose@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-10-30 09:47:01 +00:00
Vyacheslav Egorov a2ceec3e25 Require that all changes to VM have TEST line
All changes touching one of the following directories will after this
change be required to contain TEST= line.

    runtime/vm
    runtime/bin
    runtime/lib
    runtime/include
    runtime/observatory
    runtime/observatory_2
    runtime/platform
    sdk/lib/_internal/vm
    pkg/vm

This line is supposed to describe in free form how change was validated,
for example by listing existing or newly added tests.

The goal behind this requirement is to remind both reviewer and change
author that changes to the code base are in general expected to be
covered by tests, especially when CL is addressing a regression which
slipped through existing testing.

Having TEST line in the description would allow both author and
reviewer to take additional time to consider if validation was
sufficient or additional test coverage is needed.

The inspiration for this line comes from Chromium[1].

[1] https://chromium.googlesource.com/chromiumos/docs/+/master/contributing.md#describe-testing-performed

TEST=changed file in runtime/vm and run git cl presubmit

Change-Id: Ie16cf7c14af18e3a22a17084c0aebb4d1dfd6d23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169640
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-10-30 09:16:41 +00:00
Konstantin Shcheglov 2d4a3bd913 Fix UNUSED_ELEMENT for top-level getter/setter.
Change-Id: I4bba8f0d64176e8b96ce273a6679274665b901e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169789
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-30 06:27:50 +00:00
Brian Wilkerson c63f5c9d13 Prepare to publish a new version of dartfix
Change-Id: I9cf1cf3a135ffda24509f892b9039a88a40b9ee8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169791
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-30 00:11:30 +00:00
Devon Carew 9ca05a4092 Fail the flutter/engine bot on analysis info items.
Change-Id: Id82ec041a924ad6f859859fafa90570ed14b69d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169787
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-10-29 23:39:59 +00:00
Ben Konyi 45931e9ea8 [ VM / CLI ] Call VmInteropHandler.exit() instead of exit() when
enabling/disabling analytics for the CLI

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

Change-Id: Ib408d34043cd3437dceef0dac563413e0532c067
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169785
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2020-10-29 22:12:41 +00:00
Paul Berry 0b0454f9e2 Migration: don't add experiment flag to analysis_options.yaml anymore.
Now that the flag is on by default, we no longer need to supply it
when migrating.

Bug: https://github.com/dart-lang/sdk/issues/43806
Change-Id: Ib2e4ae6cb0573cd2e28d61634c63a424aebfc60d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169145
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-10-29 20:05:10 +00:00
Paul Berry 53c31dbe22 Update migration tool to set pubspec/package_config appropriately for beta.
In the beta release, we plan to recommend that people set their
pubspec SDK constraints to `>=2.12.0-0 <2.12.0`, so this change
updates the migration tool to have that behavior.

In the second beta release we'll change switch the upper bound to
`<3.0.0`.

Change-Id: Ib90e893bebaebea968b19e7de663cbbbca570f84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169143
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-10-29 20:05:10 +00:00
Paul Berry a44bbfbfb5 Revert "Migrator: Disable 'pub outdated' check temporarily"
This was a temporary measure to prevent user frustration with the
migration tool while null safety was not yet enabled by default.  With
null safety enabled by default, it's no longer needed.

This reverts commit f2b94295d3.

Fixes #41769.
Fixes #43774.

Bug: https://github.com/dart-lang/sdk/issues/43774
Change-Id: I4f7fbf0b980311d33428bc2a132b548a1c35c675
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169124
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-10-29 20:05:10 +00:00
Brian Wilkerson 26810cdd50 Fix hints in analysis_server
Change-Id: I4dd078fdca93000e8a8f5251893db1e8f990c7a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169780
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-29 19:41:56 +00:00
Ryan Macnak 2259593f83 [vm] Add missing canonical empty objects to the base object set.
Change-Id: I1927b87854dcc6021d5e56daa6520aac3b23136c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169520
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-10-29 18:52:56 +00:00
Paul Berry 65eb643181 Migration: don't produce null!.
Instead, produce `null /*no valid migration*/`.  This should lead to
less user confusion (`null!` seems crazy, since obviously a null
literal will fail a `!` check).  Note that this will be a static
error, which will give the user a better chance of noticing and fixing
the problem.

Fixes #43972.

Bug: https://github.com/dart-lang/sdk/issues/43972
Change-Id: Ibf83b786dc486b14c001c17ca2ba902dafcb8a18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169600
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-10-29 18:34:36 +00:00
Leaf Petersen a6faf8f2f9 [Language] Enable null safety in Dart 2.12.
Closes https://github.com/dart-lang/sdk/issues/22

Change-Id: I662dd17fda0ff62a871314896fbf1dbe220f41de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166790
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2020-10-29 18:25:56 +00:00
Konstantin Shcheglov 619e388a1d Breaking changes for analyzer version 0.41.
Change-Id: Ib16351e05b498fa9879e6bb4c117638cde276bfa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-29 17:08:16 +00:00
Johnni Winther 13704520a0 [cfe] Indicate nullability as assignability issue when appropriate
Closes #43592.

Bug: https://github.com/dart-lang/sdk/issues/43592
Change-Id: Ib57a70526a39a7125238546f08e1a2e97c279f0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168860
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-10-29 16:10:03 +00:00
Paul Berry 33b7f1425e Migration: remove unreachable break statements
Change-Id: Id37990606eaa1caa3fe37b9df70b861fe7a00049
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169720
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-10-29 16:05:33 +00:00
Paul Berry 68fe2649f3 Migration: remove 2 pixel offset from CSS for .region.informative-region.
This was causing visual clutter by making informative regions offset
from regular code.  Worse yet, there was a "double vision" effect
because the top of the underlying non-offsetted text could sometimes
be seen behind the informative region overlay.

Change-Id: I206c74b3d91f305a21494b767ec27f396a8513b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169700
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-10-29 16:05:33 +00:00
Erik Ernst f506071e34 Add DartType.alias{Element,Arguments} and class TypeAliasElement
First step in implementing non-function type aliases in the analyzer:
Just add the new back-references in types, such that they can refer to
a type alias which was used to obtain the type, if any.

Next step: Preserve the aliasElement and aliasArguments in summaries,
next again: Create `TypeAliasElementImpl` and ensure that the parser
can create them.

Change-Id: I1bfbc2c3893e32c5b1826552361a0238aa2b4058
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-10-29 14:39:33 +00:00