Commit graph

13 commits

Author SHA1 Message Date
Paul Berry 6594ded7d9 Run the migration tool on itself.
Change-Id: Ifbdf1c33cc359519fdcf2637d50a9e4d3b054af7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204481
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-06-23 23:35:47 +00:00
Devon Carew b782d5815f [pkg/nnbd_migration] add types to public API
Change-Id: Ie4a7bbe75dd8045b20361c3fa1e08784b990e951
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176142
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-12-15 01:34:29 +00:00
Paul Berry 9f8776f4a9 Migration: split out a MigrationCliRunner API from MigrationCli.
This API can be used by tools that wish to perform migration but want
to provide their own command-line argument parsing.

Change-Id: Ic54e993139c803ded5ac39229ae84980db12184e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151080
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-06-15 15:26:48 +00:00
Paul Berry a7c93201e4 Migration: rework how MigrationCli.run() reports an exit code.
Previously, MigrationCli.run() would always return, but it would set
MigrationCli.exitCode to indicate whether an error occurred.  This
made it necessary to thread a lot of tricky logic around to ensure
that we would exit quickly if an error occurred.  This CL switches to
using an exception, so we get the same effect automatically.

Change-Id: I2b885092dec551700900b118ec3d9acd2f3649d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150760
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-06-15 15:26:48 +00:00
Paul Berry 609b7f3735 Migration: change how we set the CLI exit code.
Setting exitCode (rather than calling exit) allows Observatory to keep
running, which makes for easier debugging.

Change-Id: If9812ead72ac04808030cd62467ba2f09b92b947
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149609
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-06-01 21:21:48 +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 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
Paul Berry 8d188a1a9f Migration: begin implementing CLI for the migration tool outside analysis server.
This will allow us to publish the migration tool on pub, so that we
can ship improvements to it that aren't coupled to SDK releases.

As of this CL, basic read-only functionality of the preview site is
working.  However, the ability to apply migrations and add hints to
existing code has not yet been tested.

Change-Id: Ib1588e741efa7be7861fa75b962fd1565765e794
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144808
Reviewed-by: Janice Collins <jcollins@google.com>
2020-04-27 16:33:23 +00:00
Devon Carew fc1d2a82f4 [dartfix] remove the 'dartfix upgrade sdk' command (prefer 'dartdev migrate')
Change-Id: I981e2b1805a81210cfb0ed7af809a07eb3eabb5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137221
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
2020-03-04 17:55:06 +00:00
Janice Collins 31053a8c01 Add analyzer run support to steamroller and minor QOL improvements.
Change-Id: I4ffadba54e5d1485307c9b98858d80f5bdbcccf8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136854
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-02-26 16:57:46 +00:00
Janice Collins 4c93115390 Upgrade steamroll_ecosystem to handle all hacks and run dartfix
end to end.

Change-Id: Idef5a99483abc79469c543435ea44289c000080a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135720
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-02-24 22:44:19 +00:00
Janice Collins e0e438bf8b Implement analysis options modification.
Change-Id: I899067652bf00b3273559b59969d6b7c30883900
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135343
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-02-11 20:14:06 +00:00
Janice Collins 7869bc39c6 Steel thread through fantasyland.
This includes a mostly feature-identical version of tool/migrate_ecosystem.sh, written in Dart.


Bug: https://github.com/dart-lang/sdk/issues/40280

Change-Id: Ib3fe2f353208038ac6c3f035fcdb17f638c68e49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134786
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2020-02-07 20:27:16 +00:00