When a method call includes a named argument such as:
f(named: x)
the analyzer represents the AST node `named: x` as an Expression. But
it's not safe for the migration tool to try to modify it in the same
way that it modifies other expressions (e.g. by surrounding it with
`(...) as Type`), because that would produce a parse error.
Improves the analyzer behavior for #45583. Note however that this is
not a complete fix yet; see the test case included in this CL for why.
Bug: https://github.com/dart-lang/sdk/issues/45583
Change-Id: I79ffcdd22654221ff7e0784b3355ecfd2ec0f01c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194008
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This CL changes the responsibility for doing flow analysis of the
implicit variable write in a `for-in` loop as follows: if the `for-in`
loop does not declare a variable, but it assigns to a local variable,
then the flow analysis client is responsible for calling `write` on
entry to the loop.
This in turn allows us to use a single code path to track "why not
promoted" information related to all possible local variable writes;
we no longer need as much special case logic to handle for-in loops.
To make the analyzer integration slightly cleaner, we change the
argument type of FlowAnalysis.write to Node rather than Expression, so
that the analyzer can pass in the ForEachParts object when analyzing a
for-in loop.
Bug: https://github.com/dart-lang/sdk/issues/44898
Change-Id: I24b47be8eac2e276cd291a5b2f2e4444c911138f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193837
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Previously, if the migration tool encountered a Future expression with
a bad type (e.g. a Future<String?> where a Future<String> was needed),
it would "fix" the problem by introducing a cast. That is nearly
always the wrong thing to do; what we want to do is null check the
value that the future *completes* with.
This CL changes the migration tool so that it fixes this case by
appending `.then((value) => value!)` to the future expression.
Fixes#45472.
Bug: https://github.com/dart-lang/sdk/issues/45472
Change-Id: I7a35b54f673936e2e4b0f8f3a077ba8bf684b4eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193700
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Previously, if the preview server couldn't be reached because it had
exited, we would generate an error message with an obscure looking
stacktrace. I believe this was prompting users to file bug reports
against the migration tool, when in fact all they needed to do was
restart the migration process. Hopefully this better error message
should help avoid confusion.
I also took the opportunity to improve the error message that is shown
if the user does restart the migration tool but tries to keep
interacting with it using an old authToken.
Fixes#45202.
Bug: https://github.com/dart-lang/sdk/issues/45202
Change-Id: I83e0ca99d789739e614bfff2d535d427a2fdfbb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192732
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Flow analysis stopped using this argument (the AST node for the
finally block) some time ago, but I kept it around so I could assert
that clients didn't unnecessarily store assigned variables info for
it. It's been long enough now that we can eliminate this code
entirely.
Change-Id: I8c64e2b4fc5b154f441ec2d057637f3dc9ced277
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190060
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
It seems to me that implicitly expecting DriverBasedAnalysisContext
is equivalent to explicitly stating this with types.
Change-Id: I16ec14e73030d9b34242a2f4ad582e93fc44afa7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189382
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This CL plumbs the types of `this` and property get expression from
the CFE and analyzer into flow analysis, so that flow analysis will be
able to create more accurate "why not promoted" information for those
expression types. This made it possible to eliminate a clumsy aspect
of the previous implementation, namely that we would consider a
promotion attempt like `if (x.y == null) return;` as an attempt to
promote the type of `x.y` to `Object`; now we compute the type the
user is actually trying to promote to, so we will be able to generate
more accurate "why not promoted" messages.
Bug: https://github.com/dart-lang/sdk/issues/44898
Change-Id: I67f9fc59e72103194a1ea6b1c4dfeae8aeb194a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187064
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
If the user tries to click around in the migration web UI before the
navigation tree has finished loading, the `navigationTree` global
variable will still be null; we need to allow for this possibility to
avoid a crash.
Bug: https://buganizer.corp.google.com/issues/181067935
Change-Id: I5398ac62bb4eb307aaa48ec39098b6ae0541a6a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188560
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This CL implements the core flow analysis infrastructure for tracking
reasons why an expression was not promoted. It supports the following
reasons:
- Expression was a property access
- Expression has been written to since it was promoted
I expect to add support for other non-promotion reasons in the future,
for example:
- `this` cannot be promoted
- Expression has been write captured
- Expression was a reference to a static field or top level variable
These non-promotion reasons are plumbed through to the CFE and
analyzer for the purpose of making errors easier for the user to
understand. For example, given the following code:
class C {
int? i;
f() {
if (i == null) return;
print(i.isEven);
}
}
The front end now prints:
../../tmp/test.dart:5:13: Error: Property 'isEven' cannot be accessed on 'int?' because it is potentially null.
Try accessing using ?. instead.
print(i.isEven);
^^^^^^
Context: 'i' refers to a property so it could not be promoted.
Much work still needs to be done to round out this feature, for example:
- Currently the analyzer only shows the new "why not promoted"
messages when the "--verbose" flag is specified; this means the
feature is unlikely to be noticed by users.
- Currently the analyzer doesn't show a "why not promoted" message
when the non-promotion reason is that the expression is a property
access.
- We need one or more web pages explaining non-promotion reasons in
more detail so that the error messages can contain pointers to them.
- The analyzer and front end currently only show non-promotion reasons
for expressions of the form `x.y` where `x` fails to be promoted to
non-nullable. There are many other scenarios that should be
handled.
Change-Id: I0a12df74d0fc6274dfb3cb555abea81a75884231
Bug: https://github.com/dart-lang/sdk/issues/38773
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181741
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
These test cases were accidentally left out of
8ad4919482.
Change-Id: I2986e7d2763ff2ee0eea4800da185a5d45d69e1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180401
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This is needed as the web app (just migration.dart) is viewed as a
stand-alone Dart file, and thus is de facto opted in.
Change-Id: I56930cc95d32ab22d2ade3c174023775a1f44771
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180483
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Previously, we did not null check the listener, which meant that if an
exception occurred in a unit test, there would be a cascading
exception, so we wouldn't get a useful stack trace.
Change-Id: I612ca9e7129441e319d92953c481fd1647eb46ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180383
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Since `this` is essentially a variable in extensions, it should be
treated similarly to variables in terms of inference of non-null
intent; for example, if an extension declaration contains a a method
that unconditionall dereferences `this` (either implicitly or
explicitly), that's a good indication that the user probably doesn't
intend for the extension to be applied to nullable types.
Fixes#44675.
Bug: https://github.com/dart-lang/sdk/issues/44675
Change-Id: I004328f5b1fd6710954363c07f4e9db6bc6ac2cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180268
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This partially addresses #44675 by ensuring that if an extension's
extended type is nullable, we won't try to insert an unnecessary null
check at the call site.
It's not a complete fix, though, because we still don't account for
obvious indications of non-null intent when analyzing the extension
definition itself. I plan to address that in future CLs.
Bug: https://github.com/dart-lang/sdk/issues/44675
Change-Id: Ia0ca37b89470a2d4882ae32cd842552ffd34930e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180263
Reviewed-by: Samuel Rawlins <srawlins@google.com>
This addresses a cyclic dependency build issue in google3.
Change-Id: I3ea917f7216e120b827577bde60b874a9bad52af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180240
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
After a variable is write captured, references to it should no longer
be considered to express non-null intent, because we can no longer
guarantee that an initially null value of the variable would
definitely lead to an exception.
Change-Id: I44c65350291a4c44cdb4b19529b13149d8170e34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180100
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Previously, code inside of local functions was treated as though it
appeared inline for the purpose of determining non-null intent. As a
result, a return statement in such a local function would cause any
code references that followed to be incorrectly treated as *not*
expression non-null intent.
Fixes#44703.
Bug: https://github.com/dart-lang/sdk/issues/44703
Change-Id: Ia74da007eb5424c784d41afeb0e2da4771578553
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180081
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Previously, the nullability graph propagation algorithm identified
non-null intent prior to inference of `late`. As a result, late
inference would be skipped for any variable with clear non-null
intent, so late inference was a lot less effective than it should be.
This requires updating several test cases where `late` should have
been inferred.
Change-Id: I0412ee7045e654185af08cc12b6ca1e6866112af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180080
Reviewed-by: Samuel Rawlins <srawlins@google.com>
This helps build the web app in google3.
Change-Id: Ia5650836b2df37cff7b76f1cc7877776d6210790
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180086
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Now that `MigrationCliRunner.shouldBeMigrated` has the correct
signature and internal clients no longer use
`MigrationCliRunner.shouldBeMigrated2`, we can remove
`MigrationCliRunner.shouldBeMigrated2`.
Change-Id: I33bdc78a603c859dd8bf1928f2dbc23233ae5e7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178763
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
The new implementation uses the same API as flow analysis. This
should allow us to significantly simplify the CFE and analyzer, by
dropping their implementations of legacy type promotion in favor of
the shared implementation.
This CL just introduces the new implementation and unit tests for it;
it does not integrate it with the analyzer or CFE. I will follow up
with a CL that does the integration.
Change-Id: Ie07b3b39604d6a022ad42f3ae6b648a317c8af28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179560
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This is non-breaking since `shouldBeMigrated` is unreferenced outside
the nnbd_migration package). Once this lands, we can switch clients
from overriding/calling `shouldBeMigrated2` back to `shouldBeMigrated`
and then eliminate `shouldBeMigrated2`.
Change-Id: I1235113bda6f7609de17ec05e7120b312f201536
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178762
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
The `url` argument is changing from `Object`, accepting either `String`
or `Uri` at runtime, to `Uri` for better static help.
https://github.com/dart-lang/http/pull/507
- Switch to using `Uri` for requests. Where sensible push this type into
the signature of the surrounding method.
- Make some updated method private where they were unnecessarily public
which makes it harder to have confidence when looking for usages.
Rename a method with an unnecessary `get` name.
Change-Id: Ibf075741d6b9d292349b15f1dc84004981729aca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179368
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
This change changes `MigrationCliRunner.shouldBeMigrated` to forward
to a transitional method `MigrationCliRunner.shouldBeMigrated2`, which
lacks the now-unused `context` argument. After this lands, internal
clients will be switched to overriding/calling `shouldBeMigrated2`
instead of `shouldBeMigrated`.
Once no clients remain that refer to `shouldBeMigrated`, the `context`
argument will be removed from it (this will be non-breaking since
`shouldBeMigrated` will at that point be unreferenced outside the
nnbd_migration package). After that, we will switch clients back to
overriding/calling `shouldBeMigrated` and eliminate
`shouldBeMigrated2`.
Change-Id: If9b476878260a5777f3346486d44c805dc361691
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178761
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
* Rename isPreviewServerRunnning to isPreviewServerRunning
* Fix top "Migrating" checkbox upon navigation.
This change does not completely solve google3-compatibility, just the
web preview UI portion.
Work to improve any opt-out `// @dart=2.9` comments will follow.
Change-Id: Iee38650ab732179d82060b14bc7b657e3c560543
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178160
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
This CL modifies flow analysis API so that when a variable is written
or initialized, if the written expression has non-trivial flow
analysis information, it is captured in the SsaNode associated with
the variable.
The stored information is not yet used; in a follow-up CL, I will add
the ability to retrieve it on a read and use it for promotions.
Bug: https://github.com/dart-lang/language/issues/1274
Change-Id: I1e2590205d4a0c59f4400a119f3d6b380a11414c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176460
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Also:
* Print out details when applying migration
* Also fix title text position to not scroll out of view.
Change-Id: Idc4b703535400956f78d76ab7959f40cf77a0bc9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175860
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Also sort test file.
Change-Id: Id8133d699ae1a71d1852ef29ce1f843c7ede98cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175561
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Emphasize that the operation is going away,
and mark constructor as deprecated.
TEST= Refactoring+deprecation only, covered by existing tests.
Change-Id: I82aa044cd2cf7bf347b624371399f44bda8f4a07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173261
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
This is a reland of 17226bbbff
Remove generated files
Original change's description:
> dart migrate: Move title bar and add 'Migrate' check box next to title
>
> This check box displays whether a file is migrating, opting out, or
> already migrated. The check box can be clicked to toggle between
> migrating and opting out. Clicking the check box updates status in the
> navigation tree. Clicking on check boxes updates the status in the
> title bar.
>
> Screenshot here: https://screenshot.googleplex.com/9z9v9L5DHhBXzEU.png
>
> In terms of the HTML, a new parent above '.content' div was added:
> the '.file' div, which includes a '.title-bar' div above the '.content'
> div.
>
> Bug: https://github.com/dart-lang/sdk/issues/44101 and
> Change-Id: I021f0dd873119ae801e29faa92e97fe48d03ef3c
> https://github.com/dart-lang/sdk/issues/44124
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174440
> Commit-Queue: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Paul Berry <paulberry@google.com>
Bug: https://github.com/dart-lang/sdk/issues/44101 and
Change-Id: Iefada3e2fc8cbbc767cfc539204dc51b369888a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174720
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Since the EdgeBuilder overrides VisitNode, it wasn't getting the
benefit of the error recovery behavior provided by the
PermissiveModeVisitor mixin. This CL replicates some of the
functionality of PermissiveModeVisitor in the EdgeBuilder._dispatch
method so that it applies throughout the EdgeBuilder's visiting
process.
This uncovered a second bug: when an exception is reported, and the
user hasn't passed in the `--ignore-exceptions` flag, the migration
tool tries to exit immediately by throwing an error of type
MigrationExit, but this was being caught by the error recovery logic,
so the tool wouldn't actually stop reliably. This CL changes the
exception reporting code so that it re-throws MigrationExit when
necessary to ensure quick termination.
Change-Id: Ifd2faf8edb7cd0087c45e20a747ab7f1790ef1c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174420
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This reverts commit 17226bbbff.
Reason for revert: has unrelated tools/abiversions changes
Original change's description:
> dart migrate: Move title bar and add 'Migrate' check box next to title
>
> This check box displays whether a file is migrating, opting out, or
> already migrated. The check box can be clicked to toggle between
> migrating and opting out. Clicking the check box updates status in the
> navigation tree. Clicking on check boxes updates the status in the
> title bar.
>
> Screenshot here: https://screenshot.googleplex.com/9z9v9L5DHhBXzEU.png
>
> In terms of the HTML, a new parent above '.content' div was added:
> the '.file' div, which includes a '.title-bar' div above the '.content'
> div.
>
> Bug: https://github.com/dart-lang/sdk/issues/44101 and
> Change-Id: I021f0dd873119ae801e29faa92e97fe48d03ef3c
> https://github.com/dart-lang/sdk/issues/44124
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174440
> Commit-Queue: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Paul Berry <paulberry@google.com>
TBR=paulberry@google.com,srawlins@google.com
Change-Id: I8b8433d47390df91201a365f5aa54c7fb835d997
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/44101 and
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174385
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This check box displays whether a file is migrating, opting out, or
already migrated. The check box can be clicked to toggle between
migrating and opting out. Clicking the check box updates status in the
navigation tree. Clicking on check boxes updates the status in the
title bar.
Screenshot here: https://screenshot.googleplex.com/9z9v9L5DHhBXzEU.png
In terms of the HTML, a new parent above '.content' div was added:
the '.file' div, which includes a '.title-bar' div above the '.content'
div.
Bug: https://github.com/dart-lang/sdk/issues/44101 and
Change-Id: I021f0dd873119ae801e29faa92e97fe48d03ef3c
https://github.com/dart-lang/sdk/issues/44124
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174440
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
This avoids an apparent hang when visiting the SDK file
`html_dart2js.dart` (which happens anytime the user clicks on a link
like `HtmlElement`).
Bug: https://buganizer.corp.google.com/issues/168936042
Change-Id: I52bb535b6a2ca1a74071e272b1276520048a67bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174441
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Checking and unchecking a directory toggles the status of all child files which
are 'migrating' or 'opting out.' Files which are already migrated do not
change.
Checking and unchecking a file updates the status of all parent directories.
Directories with both 'migrating' and 'opting out' files are 'indeterminate'.
The difference between 'file' and 'directory' NavigationTreeNodes was
getting too hairy so I split into two subclasses.
Removed the keepingOptedOut status and added the indeterminate status.
Bug: https://github.com/dart-lang/sdk/issues/44101
Change-Id: Iea1a8c07b08c3d7956db51ca372437093457fe7f
https://github.com/dart-lang/sdk/issues/44124
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173600
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
These check boxes are hidden behind a parameter that must be changed during
development; it is not wired to a public-facing flag.
The check boxes are styled, and are connected to the starting status of each
compilation unit (already migrated, opted out, migrating).
The check boxes can be toggled, but just for mocking purposes; their status is
not connected to the back end. The directory check boxes are not wired to the
status of their children.
Screenshot of checkboxes w/o colors: https://screenshot.googleplex.com/43XBRWsMPgbQXik
Screenshot of check boxes w/ colors: https://screenshot.googleplex.com/3bhJqcnmeV4sGNm
* dark green - already migrated; file is not being changed.
* light green - file is being migrated now.
* orange un-checked - file is being opted out, initial migration,
file will gain opt-out comment.
* grey un-checked - staying opted out, file is not being changed.
* indeterminate - folder has multiple states inside.
Bug: https://github.com/dart-lang/sdk/issues/44124 and
Change-Id: I49daf1f52544024ec1c6d8d5cf3c59515c7db3a7
https://github.com/dart-lang/sdk/issues/44101
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172821
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Expand the range allowed by the dep from `package:analyzer`.
Switch dependencies to `any` for the packages which are `publish_to:
none`. The actual constraints aren't useful in these packages since they
are always pinned exactly by DEPS and so we can't trust they are kept up
to date.
Change-Id: Ibd937e8646574d49105f4dd0de2529e7ab30862a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172380
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Change-Id: Ib8056827595470d8c3c8b2cb8371ab08dcc3e651
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172040
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
It's no longer just for the tools in the `tool` directory; it also
contains test utilities for use by the analyzer and related packages.
Change-Id: I0f8cf57f24ea7aad8e2177e43ee2bcb2ab3030da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171704
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
If all the user's code has already been migrated and there are no
errors, instead of crashing, produce a friendly message indicating
that there's nothing to do, and exit cleanly.
Fixes#44193.
Bug: https://github.com/dart-lang/sdk/issues/44193
Change-Id: I9da9ab0221d4e13a61985eaa3fec0e74b86e9072
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171960
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Change-Id: I8289aa274a7882a41a5411739999f1db77fc196f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172000
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
This feature is now working reliably enough that we no longer need the
option of turning it off.
Change-Id: I2bbeb114ca1bd4e0dc8e94ac6775ec5e2fa8718e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171705
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
I will need to add another callback in a follow-up CL, and it seems
silly to pass a bunch of closures to the DartFixListener constructor.
Change-Id: I969d1d90fca0889b131589248aaa1cec343a9059
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171700
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>