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>
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>
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>
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>
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>
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>
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>