Closed dnfield closed 5 years ago
/cc @HansMuller who reported similar
/cc @aam you have any idea on this one?
I believe we don't handle correctly the situation where update failure is caused by analysis step. We currently assume that if app update failed, then it was after compilation was done, so we are telling the compiler to reject the changes. In this case compiler didn't to see the changes, so there is nothing to reject.
I also run into this failure mode about once a day. One sign that things have failed and that restarting will no longer recover the app is this sort of compilation error: Foo/1/...
can't be assigned to Foo/2/...
. For example:
Performing hot restart...
Restarted application in 1,719ms.
I/flutter (11894): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (11894): The following _CompileTimeError was thrown building HomePage(dirty):
I/flutter (11894): 'package:test_issue/main.dart': error: lib/main.dart:15:31: Error: The argument type
I/flutter (11894): 'List/1/<Widget>' can't be assigned to the parameter type 'List/2/<Widget>'.
I/flutter (11894): - 'List/1/' is from 'dart:core'.
I/flutter (11894): - 'Widget' is from 'package:flutter/src/widgets/framework.dart'
I/flutter (11894): ('file:///usr/local/google/home/hansmuller/github/flutter/packages/flutter/lib/src/widgets/framework.dart').
I/flutter (11894): - 'List/2/' is from 'dart:core'.
I/flutter (11894): Try changing the type of the parameter, or casting the argument to 'List/2/<Widget>'.
I/flutter (11894): children: <Widget>[
I/flutter (11894): ^
@HansMuller wrote
I also run into this failure mode about once a day. One sign that things have failed and that restarting will no longer recover the app is this sort of compilation error: Foo/1/... can't be assigned to Foo/2/....
what you see seems to be different, tracked on https://github.com/dart-lang/sdk/issues/35715.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
Reproduction steps:
Run a valid flutter app.
Edit the app to have a syntax error (e.g. extra/misplaced comma or paren).
Hot restart.
See error in console:
Fix error, hot restart again: