Commit Graph

3481 Commits

Author SHA1 Message Date
Jaime Wren 3dc7664a8a Additional tests in override_contributor_test.dart
Change-Id: I04311b5685bb853926ebef4c20aef5ac58b5881d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-04-29 20:54:04 +00:00
Jaime Wren cb77214f19 Revert 2 of the override_contributor.dart changes from last week.
This reverts commit f7d14e49 and 45588642

Change-Id: Iab211d2879f2bd6a420ea6fb5b0de058c02ac4ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145481
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-04-29 18:22:49 +00:00
Sam Rawlins 82e4a4465b Migrator: change sdk constraints to >=2.9.0 <2.10.0
Bug: #38347
Change-Id: Iedb9acfe313a14d4c35f3637f3ef0104e836dd4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145260
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-04-29 17:47:44 +00:00
Brian Wilkerson 2270add4ae Use the element kind feature for instance members
Change-Id: I8fb449e485c77f7c13b9dd8b01f056d970ba551b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145302
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-04-28 23:40:43 +00:00
Brian Wilkerson 5528d8daac Add a fix to add the required keyword
Change-Id: I2602ab5b4d3b47d3d8e302aa60847b791768481a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145200
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-04-28 20:04:22 +00:00
Konstantin Shcheglov 39c503970b Reset the library context in FileResolver by timeout.
R=brianwilkerson@google.com, keertip@google.com

Change-Id: I4dafff7229ad8a6f6713d6929121222ad818eccf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144996
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2020-04-28 19:38:02 +00:00
Konstantin Shcheglov d57c35f2ac Fix CiderFixesComputerTest on Windows bot.
TBR

R=brianwilkerson@google.com, keertip@google.com

Change-Id: I1b4d6fcc8a87edd2b0dc4c9996698257aed48f7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145141
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-04-28 17:12:10 +00:00
Konstantin Shcheglov 14f41846ab Add CiderFixesComputer.
Change-Id: Ie0a69ccbba5a6b9afec322caeb3d8edfe8293abd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145021
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-28 15:34:31 +00:00
Jaime Wren 38c0fb78b6 Completion bug fix - extended types will now be completable in extension declarations
Bug: https://github.com/dart-lang/sdk/issues/41665
Change-Id: I5e89babc7a52fa833ebd55398fca50b292c710da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-04-27 19:20:08 +00:00
Jaime Wren 7dd9945622 Bug fix in combinator_contributor.dart, don't suggest names already shown or hidden by the existing combinators (in the same directive).
Change-Id: I8de3670d4026ed2b6eda4c24223580e22015864b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144806
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-04-27 16:18:09 +00:00
Konstantin Shcheglov 03429b20cd Use FuzzyMatcher for Cider completion filtering and sorting.
R=brianwilkerson@google.com, keertip@google.com

Change-Id: I1b8360e95327dfd4eaefaa8990105bd4750c2acc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144864
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-27 04:10:09 +00:00
Konstantin Shcheglov f43437cf80 Fix for avoid_types_as_parameter_names in try/catch.
R=brianwilkerson@google.com, pquitslund@google.com

Change-Id: I5d7e89567ac947274de073b166840753a79814bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144786
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2020-04-27 03:29:09 +00:00
Brian Wilkerson a53d336b9f Convert the remaining methods in BaseProcessor to use subclasses of CorrectionProducer
Change-Id: Ide2c426939f6a0965caaa37a87ebe825b74d9d17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144787
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-04-26 20:12:49 +00:00
Brian Wilkerson 78907e46db Another round of cleaning up the code in BaseProcessor
Change-Id: I347d585050023bf26d50913658d8413490e37155
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144812
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-04-25 00:26:07 +00:00
Paul Berry 299c852b60 Migration: make an API for shutting down the preview server.
This will make it easier to write automated tests of the preview
server.

Change-Id: I4605beaa9ce3a8f43ec358568a53f24b4f05dece
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144801
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-04-24 22:53:17 +00:00
Simon Binder aa529bc684 Support plugin notifications in LSP server
This adds support for analysis domains that plugins contribute to by
sending notifications. I've only implemented folding so far, but most
of this CL is to cache results from plugins and to adapt sending server
capabilities.

Instead of using a NullNotificationManager, the LSP server now uses a
regular NotificationManager, except that results won't be forwarded to
clients. LSP handlers will fetch partial results from plugins and merge
them with data from the server that will be computed when needed.

I've extracted the server capabilities calculation from the init
handlers into ServerCapabilityComputer. It will also contain the
interestingFiles glob from active plugins and re-register capabilities
whenever plugins change.

Change-Id: I9869240cbfa284592e952498933e638b89a2a763
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142981
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-04-24 20:36:07 +00:00
Jaime Wren 455886420c Bug fix in the override_contributor.dart, don't generate the override completions if the target is in a comment text.
Change-Id: Ifbde00721858c9ad58b9d50cadf7775e37cf235b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144802
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-04-24 20:34:47 +00:00
Paul Berry eab774c255 Move much of migration tool UI code into pkg/nnbd_migration
Change-Id: Ia3b388b274c908dcc6f9cb9ee4bf004b82681c43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144320
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-04-23 23:43:42 +00:00
Jaime Wren f7d14e49c2 Modify the override_contributor.dart to provide the completions even when no class member characters have been typed.
Change-Id: I03164bcb0761faf7634ec219a1b1cc87dc568fa9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144493
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-04-23 16:19:49 +00:00
Paul Berry d2331fd8fc Migration: Remove MigrationState.adapter and InfoBuilder.adapter.
These fields were not being used.  Removing them will make it easier
to move these classes into pkg/nnbd_migration.

Change-Id: I7528bc07e5efd3936a9c6fd1635415e139d5df43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144466
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-04-23 12:35:39 +00:00
Konstantin Shcheglov 5ee47142e6 Fix CiderCompletionComputerTest on Windows.
Change-Id: Ic4b094995c1662b4d42317877cea91767fb1fbff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144486
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-04-22 19:52:28 +00:00
Konstantin Shcheglov a934ec2961 If possible, reuse the last completion result.
Also rename "character" to "column".

R=brianwilkerson@google.com, keertip@google.com

Change-Id: I6167de6e1fd5aede2a619603635e96f16bfbcc8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144352
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-22 14:50:38 +00:00
Sam Rawlins 29bc716241 Migrator: Add a late inference component
Fixes #38747

Change-Id: I045a6481424c75828eb7ae1e71c890b10e9d402c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144244
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-04-21 23:54:54 +00:00
Konstantin Shcheglov 65a944f78f Add CiderCompletionComputer.compute2(), tests.
R=brianwilkerson@google.com, keertip@google.com

Change-Id: Ie6acad3873f78060cde85a350ebd48b854ea1314
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144345
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-21 23:46:04 +00:00
Paul Berry 925e3fe782 Migration: detect weak-only code in conditional expressions.
This change adds the ability to detect when one branch of a
conditional expression is weak-only due to nullability.  For example,
in the following code:

  int f(int/*!*/ i) => i == null ? g(null) : i;
  int g(int j) => ...;

the call to `g` can only happen in weak checking mode.  The migrator
also now understands that j only needs to be nullable if i is
nullable.

Fixes #41555.
Partially addresses #41551.

Bug: https://github.com/dart-lang/sdk/issues/41555
Change-Id: I02c9c3072f0104db0f1a5b432fb1f2f8f06d5282
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144120
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-04-20 19:09:32 +00:00
Danny Tuppeny 4932348ff3 Expose fix/assist IDs in LSP code actions
Change-Id: Ic75fd362f9feada81834a7d36419c27cf316f18d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143814
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-04-20 14:57:26 +00:00
Brian Wilkerson 1c12bde2a9 Add a fix to remove invalid question marks
Change-Id: I24caf62176e3426dddcae17204a1435f0f7946d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144080
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-04-20 02:42:25 +00:00
Mike Fairhurst 232826b6e6 [nnbd_migration] fix #41391, crash applying migration.
This is caused by changes to non-dart code, which does not get a
UnitInfo.

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

Fixed: 41392
Change-Id: I5054c672c0ca87027d66f1304385ea29d3e17d10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144001
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-04-17 22:54:04 +00:00
Brian Wilkerson 40661e3bc6 Create the class SuggestionBuilder and pass it to contributors
Change-Id: Ia36906d614ced8d8b783a03f86385ebc903375c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143965
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-04-17 20:48:04 +00:00
Mike Fairhurst 3de4d76b4a [nnbd_migration] Use offsets instead of column numbers in traces
Change-Id: I37f44c1a4713106e15b346739354b73592d208d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143721
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-04-17 19:07:44 +00:00
Paul Berry d52dc104d4 Migration: instead of removing weak-only code, warn about it.
Previously we considered such code "dead", but it's not really dead
until Dart 3.0.  Removing it changes weak mode semantics, and we don't
want to do that automatically.

Fixes #41231

Change-Id: I6a88f016b4f3fcba160dcb738558867219715cbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143941
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-04-17 17:27:59 +00:00
Brian Wilkerson 0eaf749dfd Fix some hints in analysis_server (TBR)
Change-Id: Ia43fa5ad0b12b24f434483da67ce168fb39a69fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143886
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-04-17 15:11:58 +00:00
Paul Berry 4747672929 Migration: fix preview output when accepting a /*late*/ hint.
Change-Id: I383be37cc86d3c83f5b2b332ae14ce35516f858d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143563
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-04-17 00:17:15 +00:00
Paul Berry a72e0e3412 Migration: don't double count edits when accepting hints
Technically, accepting a hint requires two edits, one to remove the
`/*` and one to remove the `*/`.  But we only want it to show up as
one edit in the "Proposed Edits" pane.

Fixes #38471

Change-Id: Ica7880a2ffab98715a1c9f3bbe723363fd481086
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143484
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-04-17 00:17:15 +00:00
Paul Berry fdc13e3f43 Migration: remove hints when performing migration.
Previously, if we migrated a code snippet like this:

  void f(int/*?*/ i) {
    /*late*/ int j = i/*!*/;
  }

the migration result would leave the hints and add the hinted text,
resulting in:

  void f(int?/*?*/ i) {
    /*late*/ late int j = i!/*!*/;
  }

We now simply remove the `/*` and `*/` surrounding each hint (with
whitespace corrections as needed), to produce:

  void f(int? i) {
    late int j = i!;
  }

Change-Id: Ic4e1216cb4693d73d71c9ab1a37d5cc15b8ef334
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143460
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-04-17 00:17:15 +00:00
Sam Rawlins 4f2e21b351 migrator: Update pubspec.yaml, not analysis_options.yaml
Fixes #38347

Change-Id: I201a02ad467401e8277631947dcdf3a19f74ddb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143440
Reviewed-by: Janice Collins <jcollins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-04-16 17:35:34 +00:00
Brian Wilkerson 84beb4d31b Implement the element kind feature
In addition to implementing the feature, this CL updates one of the
contributors to use the new feature as a way of testing it. I haven't
looked to see whether it impacts the metrics, but I wouldn't expect much
change anyway because of the small number of completions that are likely
to be effected by this change.

It might be interesting to start thinking about ways to measure the
impact of individual features.

Change-Id: Idd0040a774e5fd9a6e3f6c29d0aa7fd762676fbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143622
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-04-16 14:33:24 +00:00
pq 0e7df4b062 Remove unneeded <Widget> type params from "wrap with..." assists
Fixes: https://github.com/dart-lang/sdk/issues/41517



Change-Id: I18a560a82863c576cab8694eb940f16a9ebedfee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-04-15 19:44:57 +00:00
Brian Wilkerson f7f0e2b51b Add a fuzzy matcher for filtering completion suggestions
Change-Id: If3e9f87ad6a98be8f2a1f4c5c51679a48a206cf4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143400
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-04-15 18:47:42 +00:00
Sam Rawlins 2feaa2ad81 analyzer: Add SecurityLintCode and a new getter on ErrorCode, isIgnorable
`isIgnorable` is the new way to determine whether a report from the
analyzer can be ignored. Codes with an ERROR severity are not ignorable,
and the new SecurityLintCode is not ignorable.

Change-Id: Ied72f1b61808eda088b947b8836e0cf1dfdd9850
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143331
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-04-15 01:51:59 +00:00
Paul Berry 1d3105e0b3 Migration: prioritize changes differently if they're due to hints.
Change-Id: I4dfdd0287e488dfac21923c71741d2218a2c070c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143334
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-04-14 23:33:46 +00:00
Paul Berry 46b49d23ec Migration: track multiple fix reasons for expressions with complex types.
Change-Id: I1a1f78377ed64504e5315b5096914219dc625e78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143188
Reviewed-by: Janice Collins <jcollins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-04-14 23:33:46 +00:00
Mike Fairhurst 46a89f7671 [nnbd_migration] allow edits to be done incrementally.
Mutate datastructures to match disk contents. Leverages offset mapper,
by rebasing the migration mapping onto the disk changes which occur in
sequence.

Add an integration test for preview site tests that confirms multiple
changes workflow works, including regions and navigation, including
using the changed edit offsets.

One thing that is not updated is traces. It seems that trace entries are
misusing "offset" by storing column values. Without that, adjusting
trace entries is not trivial. I have not looked into how difficult it
would be to correct this. Traces still *work*, they just may point to an
incorrect column. This is not easy to notice, but worth fixing in the
next CLs.

Another potential consistency improvement would be to use the offset
mapper to handle regions so that they do not need to be updated this
way. This would be more consistent with how other things like navigation
did not require updates once the offset mapper was done correctly.

Another quirk is that this API for performing edits does not *necessarily*
lend itself to reruns. For this CL, I decided to check when the edit is
"insertion only" and therefore easy to do incrementally. However, the API
allows for things like mass deletions that might be trickier to handle in
general. In this case, it will still do a rerun.

Change-Id: Ib88bb32592f54502d69b58ccab71ffb0b5f8040e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143325
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-04-14 22:42:46 +00:00
Mike Fairhurst 05c867873a [nnbd_migration] Reset dartfix change listener on rerun.
Without this, rerunning causes the change list to grow, including all
prior changes. When users hit the apply migration button, the result is
corrupt.

Change-Id: I3b57b24be25e897ac6c976254d04a78dbb3a5a7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143324
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-04-14 22:42:46 +00:00
Mike Fairhurst da2f4a6363 [nnbd_migration] Add CSS class tracking when the user needs to rerun
Currently not hooked up to any special styling, but will hide the "apply
migration" button.

Also currently not set to true by any workeflows, but that will of
course change in follow-up CLs.

Change-Id: Ie0ef64361dac40b19bf08497c1c4f92a80b0891d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143323
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-04-14 22:42:46 +00:00
Mike Fairhurst 2c86d0b78a [nnbd_migration] Clean up edit URLs in preview site tests
Change-Id: Ia2b97085a1433532a5af0f66ed54a023715f8fd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143305
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-04-14 21:05:25 +00:00
Mike Fairhurst 3ae6f3231e [nnbd_migration] Rename originalContent to diskContent, it can change.
Remove assertion as well that disk content is only set once. In the new
workflow it can be set many times.

Change-Id: I86039fee1d144a8a03cd82dc5c9e0f45bb130141
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143304
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-04-14 21:05:25 +00:00
Mike Fairhurst b7262388a3 [nnbd_migration] Add optional offset mapper to navigation assertion
Change-Id: I2895e4da2af5419744a20b6e38c630ca21bf602c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143321
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-04-14 21:05:25 +00:00
Mike Fairhurst 9f0c5cbcad [nnbd_migration] Move region & navigation target asserts into test base
Change-Id: Ifa19451fd3985d7068ebaf18fedd7bc2304f6cc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143320
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-04-14 21:05:25 +00:00
Mike Fairhurst 23b636ae29 [nnbd_migration] Add three new offset mappers: insert, sequence, rebase
Change-Id: I5c11a98acf54735c21e7bf399ef099f371ebdb39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143281
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-04-14 21:05:25 +00:00