Commit Graph

1123 Commits

Author SHA1 Message Date
Mike Fairhurst 42b71b8f9e [nnbd_migration] Fix #41795, delete/change hint causes rerun.
This is only an issue for the old style (not in stacktrace) buttons.

I did not add a test for this; there are many tests for this code in the
new workflow, inside UnitInfo.handleSourceEdit, etc, and this code path
will be removed soon hopefully.

I *did* test manually and saw that it works.

Change-Id: Iac8ba4cb775b9b15c8db1c1cadd4701da81452be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149382
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-05-29 14:33:15 +00:00
Sam Rawlins d79c5b5d31 Migrator: run pub outdated from the correct directory
Fixes https://github.com/dart-lang/sdk/issues/42084

Change-Id: I74eb3cbf61f4346b82f81f77977989fbbd7f8274
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149366
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
2020-05-29 00:23:09 +00:00
Sam Rawlins 2dea325d87 Migrator: use pub.bat on Windows
Fixes https://github.com/dart-lang/sdk/issues/42102

Change-Id: Ic2dd785a84835402c7af3ef7b8d15285585a0afb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149386
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
2020-05-28 23:17:12 +00:00
Paul Berry bf30eb53e2 Migration: Remove "fantasy land" functionality
We're not currently working on this, and it has some dependencies that
interfere with publishing the migration tool.  If we wind up needing
it again, we can always revert.

Change-Id: Ia6219ac376cef77bda7470777eaf2bebf38769b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149343
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
2020-05-28 22:05:05 +00:00
Paul Berry 2e261f9386 Migration: add locations to trace entries that refer to elements.
Bug: https://github.com/dart-lang/sdk/issues/41402
Change-Id: I0dc59ae9d64c6e8ab470b2ddcb5fd42557ba5704
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148742
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-05-27 21:52:14 +00:00
Paul Berry be6cbd3fb8 Sort declarations in instrumentation_test.dart
Change-Id: I0a9febdad57779b2d9d3f17e1d4909194ca15772
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148740
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
2020-05-27 21:52:14 +00:00
Mike Fairhurst 76839d5e4d [nnbd_migration] Fix navigation urls on windows.
Change-Id: I226b36039c781e3f12b76e8ee3a5ae5e8eefcbed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149055
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-05-27 19:56:14 +00:00
Konstantin Shcheglov 00fa48fbb1 MockSdk does need to create summary.
Change-Id: Id62bc99394e9afd6306ba6a12118d7bcd045a598
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149202
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-27 19:39:10 +00:00
Sam Rawlins 3c6a3fba30 Migrator: Add some failing tests for extensions
Bug: https://github.com/dart-lang/sdk/issues/39387
Change-Id: I2187db2433255fd950789942712d215c2472db4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149005
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-05-26 23:24:22 +00:00
Konstantin Shcheglov 279024d823 Deprecate InstanceCreationExpression.staticElement
Change-Id: I3c2de8ce22944963418d543b887720db15badd0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148981
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-26 22:56:42 +00:00
Sam Rawlins 0f7653bb66 Migrator: Fix crash when target of extension method invocation has type names
Fixes https://github.com/dart-lang/sdk/issues/41958

Change-Id: Ib6e3b9d8fbb9d0083c007118a346150d57969461
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148884
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-05-26 17:54:13 +00:00
Konstantin Shcheglov 80e9667f2c Fix unused imports.
R=brianwilkerson@google.com

Change-Id: I02f47632bef3a2e601f7f471c7149829e06844f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148963
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-25 16:58:38 +00:00
Sam Rawlins 16b90d2085 Migrator: Check dependencies with pub outdated
Fixes https://github.com/dart-lang/sdk/issues/41769

Change-Id: I892322076c1d03026c42c13b98bb1dcb466e9263
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148789
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-05-21 22:06:53 +00:00
Mike Fairhurst 9bcdbfa34e [nnbd_migration] Update README
Change-Id: Idc81bbebadbe3d6111a6e7e31ee0c68a30d8ff26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148795
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
2020-05-21 19:50:23 +00:00
Sam Rawlins 07dd27673a Migrator: Fix crash when casting to generic type
Fixes https://github.com/dart-lang/sdk/issues/41955

Change-Id: I6ca9f1ceae7992f4085f96c927ec989dbb6e2568
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148741
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-05-21 17:09:43 +00:00
Sam Rawlins 562b11a4d8 Migrator: Add types to implicitly-typed field formal parameters
Fixes https://github.com/dart-lang/sdk/issues/38453

Change-Id: I56474071fcc7d408487fc74bd76d7520022f0259
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148643
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-05-20 22:29:14 +00:00
Mike Fairhurst 361070ba3f Reland [nnbd_migration] Fix two popup style bugs
Relands https://dart-review.googlesource.com/c/sdk/+/148642

Due to a z-index bug, regions are showing up on top of the popup. Fixed.

A regression during a previous a.button/.button change that meant that
the close button wasn't rendered as a button.

Previous change from `a.button/.button` reduced the specificity which
caused incorrect font color in edit link buttons. This has been fixed by
using `.button, a.button` so that we keep the desired specificity but
also keep applying the style to all elements with the `button` class.

Change-Id: Idb5eb154904430d946a80b7574537564b7c71bd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148646
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-05-20 18:04:02 +00:00
Mike Fairhurst 5910a61a7b [nnbd_migration] Show error popup on GET requests, refused connections.
I noticed that failed GET requests did not show the error popup. At the
time it seemed like uncommon enough to not be a priority, but this is
occurring frequently for windows users, so it's not reasonable to rule
this out and should be handled.

I also have seen that if the preview server is killed, we get an
unhandled `ProgressEvent` error which is just "instance of minified:ew",
handle that case more gracefully as well.

Change-Id: I4f1f307dc33cd7bf0d76a9702df6728dda09926e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148601
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-05-20 18:01:51 +00:00
Mike Fairhurst 79762f96f8 [nnbd_migration] fix hint test on windows that unnecessarily maps a path
Change-Id: Id35ae2332520c96265b92abd31c8ec3a92521c8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148569
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-05-20 15:42:54 +00:00
Paul Berry 15df850fd3 Migration: fix trace display for variable and field types.
Change-Id: Ib601fea6b6edd50a047471fe4eacf56339e4a4a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147345
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-05-20 15:09:10 +00:00
Mike Fairhurst 71c10c4c9c [nnbd_migration] Fix navigation tree test on windows
Change-Id: Ib6bbf1af5c6061423093e1b05a1ce135ee097d47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148686
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-05-20 14:05:10 +00:00
Mike Fairhurst 4e2f7ac9a2 [nnbd_migration] Fix navigation tree on windows.
Ensure that the preview server responds with full paths so that the
front end does not need to do path magic on relative links, and test
that those full paths are correct on both windows and linux.

Remove [UnitLink.uri], as it is no longer correct, and it does not have
access to a [PathMapper] which is necessary to build a correct URI.

Change-Id: I7ef764d84c0859d72a21134dc042f837767e91b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148565
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-05-19 21:08:51 +00:00
Mike Fairhurst a2a98e2362 [nnbd_migration] Fix stack trace links on windows.
Previously, the backend was returning a relative URI, but that doesn't
work when you have stack traces across root directories. So the front
end used path logic to turn the relative path into an absolute one, but
it didn't do this correctly on windows.

Instead just send an absolute path (still a relative URI, though) from
the backend.

Change-Id: Ied06a9d948851fcf6dc1d4aa007961d3d2a000fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148564
Reviewed-by: Paul Berry <paulberry@google.com>
2020-05-19 21:08:51 +00:00
Mike Fairhurst 59d66151d8 [nnbd_migration] Fix edit region top link on windows.
We want to continue to show windows users the windows path, but on click
we want to take load based on the uri path.

Change-Id: Idb1bff3cac1a7b9830c3a4458fc79fbf76551b4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148561
Reviewed-by: Paul Berry <paulberry@google.com>
2020-05-19 21:08:51 +00:00
Mike Fairhurst 73c51fc03b Revert "[nnbd_migration] Fix two popup style bugs"
This reverts commit 480e34ce99.

Reason for revert: `button, .button` is not specific enough, has too low of precedence, resulting in edit link buttons getting the wrong color. Will reland as `button, .button, a.button`. Thanks CSS :)

Original change's description:
> [nnbd_migration] Fix two popup style bugs
> 
> Due to a z-index bug, regions are showing up on top of the popup. Fixed.
> 
> A regression during a previous a.button/.button change that meant that
> the close button wasn't rendered as a button.
> 
> Change-Id: I2c8b84655bd8afdbc0163f5dd810bca84c3db8b2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148642
> Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
> Commit-Queue: Paul Berry <paulberry@google.com>
> Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
> Reviewed-by: Paul Berry <paulberry@google.com>

TBR=paulberry@google.com,mfairhurst@google.com,srawlins@google.com

Change-Id: I29f92aaa79c6285e2822866660e1b5f77b1f43ae
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148644
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-05-19 18:18:30 +00:00
Paul Berry de5b23d63d Migration: remove abstract interfaces defined by analysis_server for use by nnbd_migration.
These interfaces acted as a temporary bridge to allow analysis server
core classes to provide services needed by nnbd_migration without
forcing analysis_server to depend on nnbd_migration; that in turn
allowed the analysis server to provide migration services to dartfix.
Now that we no longer use the analysis server nor dartfix for
migration, these interface classes are no longer needed.

As of this commit, the nnbd_migration package no longer depends on
analysis_server.

Change-Id: Ia923d91dd59c9a612000da8b0c9ead8a68686d89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148560
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-05-19 18:09:54 +00:00
Paul Berry 4f4ef71798 Migration: copy pages.dart to nnbd_migration package.
Previously we re-used pages.dart from the analysis server.  This paves
the way for making nnbd_migration independent of the analysis server,
which will allow it to be published on pub.

Note that only the portions of pages.dart that are actually used by
nnbd_migration are retained.

Change-Id: I48db228a3bf372cf918f2d2719f8f5415ddfc193
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148511
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-05-19 18:09:54 +00:00
Paul Berry e248acc156 Migration: remove dependency on analysis server's fix_code_task.dart.
Change-Id: I07b30dbfdf82d940f51d8f009d0e44e2baea15ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148509
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-05-19 18:09:54 +00:00
Paul Berry 9261549cdb Migration: eliminate preview_site_test.dart's dependency on analysis_server.
Change-Id: I7582f1cfc52d1fa7ed84e1c2f9b3669d3af4ef57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148541
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-05-19 18:09:54 +00:00
Mike Fairhurst 480e34ce99 [nnbd_migration] Fix two popup style bugs
Due to a z-index bug, regions are showing up on top of the popup. Fixed.

A regression during a previous a.button/.button change that meant that
the close button wasn't rendered as a button.

Change-Id: I2c8b84655bd8afdbc0163f5dd810bca84c3db8b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148642
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-05-19 18:01:30 +00:00
Sam Rawlins 718c83abe6 Migrator: Add decorated types for class alias implicit constructor parameters
This is necessary for the included test case, and also for an upcoming
change to MigrationResolutionHooksImpl to support changing parameter
types in general.

Bug: https://github.com/dart-lang/sdk/issues/38453
Change-Id: I587ae86943d0fa349b03037a76dee91fb0298dcc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148583
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-05-19 17:26:51 +00:00
Paul Berry e1316a1cc1 Migration: replace imports of analysis_server with imports of analyzer_plugin where possible.
Change-Id: I329e423bbe47645432d7a37e50a1877c7395f63d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148504
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-05-19 17:08:00 +00:00
Paul Berry e589f5f76b Migration: remove isolate_server.dart.
This code was necessary when the NNBD migration engine was part of the
analysis server, to allow migration to be run in-process.  Now that
it's been separated to its own library, it always runs in process, so
this code is not needed anymore.

Change-Id: Id9e497dca6700ad804f2410cb3b20107be3a4bd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148503
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-05-19 17:08:00 +00:00
Paul Berry fc9ed66071 Migration: remove analysis_server dependencies from some test classes.
These tests were initially based on analysis server tests, so they
shared a lot of analysis server infrastructure.  However, none of that
infrastructure was really needed; we can test equally well just using
analyzer infrastructure.  This helps pave the way for removing the
dependency from nnbd_migration on analysis_server, which will in turn
allow nnbd_migration to be published as its own package.

Change-Id: Icccb73a6248a0b766db5cfe66f42a6dceac0d944
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148540
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-05-19 17:08:00 +00:00
Paul Berry fa3a17bc4f Sort declarations in nnbd_migration_test_base.dart
Change-Id: I866fe463c81f59e40898f3ac39df54d8fc1a3c19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148469
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-05-19 17:08:00 +00:00
Paul Berry 48202fa5c2 Migration: extract some implementation details from migration_cli.dart
This will enable these classes to be re-used in unit tests.

Change-Id: Icb5e7ede94603577de44a7d53c30bb4e76a92b96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148465
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-05-19 17:08:00 +00:00
Mike Fairhurst f943d994d3 [nnbd_migration] Support change hint type in stack trace
Change-Id: I715875bb72d4a19480c5f42e796b4ec4cabe3881
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148189
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-05-19 16:34:20 +00:00
Mike Fairhurst b21ee57ccd [nnbd_migration] Support remove hint action in stack traces
Change-Id: I2878fde38b233747d8cf9e3e8666b5768f3125fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148187
Reviewed-by: Paul Berry <paulberry@google.com>
2020-05-19 16:34:20 +00:00
Mike Fairhurst a8ab569f5c [nnbd_migration] Support deletions in UnitInfo.handleInsertion
Change `handleInsertion` to use a `SourceEdit` instead, and update
`PreviewSite` to use it, but otherwise do not change `PreviewSite`. That
can be tested later when we have new `HintAction`s that allow us to
exercise this new code.

Change-Id: Idd6d782e003d4d643abb5770daa9055685f2e76a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148186
Reviewed-by: Paul Berry <paulberry@google.com>
2020-05-19 16:34:20 +00:00
Mike Fairhurst fdc19bc8f1 [nnbd_migration] Support replace/delete in offset mappers.
Change-Id: Ieef27cff8c9d03537b8f80e5d436eec524abac7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148220
Reviewed-by: Paul Berry <paulberry@google.com>
2020-05-19 16:34:20 +00:00
Mike Fairhurst 6208c169c7 [nnbd_migration] Fix #41872, don't lose stacktrace state on edit
Change-Id: I51bc87416d382854e8eb94404e4c3c3b1ef92a43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148005
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-05-15 19:21:48 +00:00
Mike Fairhurst 40d048ac29 [nnbd_migration] Fix hint action windows test.
Previous windows-incompatible implementation of hint action mapped the
path unnecessarily. The path for the new hint action comes from the AST
node and not a web URL and therefore should not be (and cannot be)
mapped for it to work on windows.

In the process of fixing this on cli_test, I missed this place where an
extra map was added in the preview_site test code which causes the test
to fail on windows.

Change-Id: If8d175379f0cb9fe864ab1f588af514a17b4758b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148229
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-05-15 19:15:43 +00:00
Paul Berry 166d083389 Migration: remove directory lib/api_for_analysis_server.
This existed solely to have a centralized location for the analysis
server's dependencies on nnbd_migration.  Now that nnbd_migration
doesn't depend on the analysis server, there's no need for it anymore.

Change-Id: I24b231337b1f724840b4533afef1672241b0af4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148181
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
2020-05-15 17:12:02 +00:00
Paul Berry c38742cdbc Migration: remove references from analysis_server to nnbd_migration.
Change-Id: I90b562b8b3e82b770f197d7ef2c4e10ac9f99100
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148160
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-05-15 16:49:32 +00:00
Mike Fairhurst 5b81c0a6d2 [nnbd_migration] Handle stack trace edit links in web view
Change-Id: Ib893059681dbf8d29a575b71df6e67eb50f0c814
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147815
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-05-14 22:51:45 +00:00
Mike Fairhurst f6d1c93a70 [nnbd_migration] Handle new stack trace add hint action
Change-Id: I94e11938214413955e066f5e1b00c412ee6d78f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147814
Reviewed-by: Paul Berry <paulberry@google.com>
2020-05-14 22:51:45 +00:00
Paul Berry d00d800f3a Migration: connect dartdev to new command-line API.
We no longer use the analysis server or dartfix for migration.

This should unblock removing migration integration from dartfix, which
will unblock publishing dartfix.

It should also pave the way for future changes that will allow us to
publish the NNBD migration tool on pub, which in turn will allow us to
provide updates and bug fixes to the migration tool without having to
publish a new Dart or Flutter SDK.

Change-Id: I9f128b61a2983befc5ef686867dab3db87fd6855
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148020
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-05-14 18:03:21 +00:00
Paul Berry 898f28d51a Migration: do not parse args in new CLI handler.
This is a step toward integrating the new migration CLI with dartdev.
It's necessary because dartdev handles arg parsing.

Change-Id: Ie50a69c434fd4d8873616e72b8274545cf0277d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148007
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-05-14 18:03:21 +00:00
Sam Rawlins a432ca0f8c Migrator: Improve adding explicit types to parameters and variable declarations
While working on #38453, I encountered these issues.

Change-Id: I6abbfca19d9f6de771181e7f5515681cbbc39a4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148080
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-05-14 17:32:01 +00:00
Mike Fairhurst 95e11bc2d3 [nnbd_migration] Fix #41894, corrupt offset mapper on edit links.
Fixed: 41894
Change-Id: Ice7b436baa57c473f8cdcab02580b8e531372d7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148026
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-05-14 17:22:01 +00:00