Unverified Commit edc07814 authored by Alexander Aprelev's avatar Alexander Aprelev Committed by GitHub

Reset list of dirty assets to be evicted when we do restart (#12743)

parent c936aa8c
...@@ -296,6 +296,11 @@ class HotRunner extends ResidentRunner { ...@@ -296,6 +296,11 @@ class HotRunner extends ResidentRunner {
} }
} }
void _resetDirtyAssets() {
for (FlutterDevice device in flutterDevices)
device.devFS.assetPathsToEvict.clear();
}
Future<Null> _cleanupDevFS() async { Future<Null> _cleanupDevFS() async {
for (FlutterDevice device in flutterDevices) { for (FlutterDevice device in flutterDevices) {
if (device.devFS != null) { if (device.devFS != null) {
...@@ -348,6 +353,7 @@ class HotRunner extends ResidentRunner { ...@@ -348,6 +353,7 @@ class HotRunner extends ResidentRunner {
// TODO(aam): Add generator reset logic once we switch to using incremental // TODO(aam): Add generator reset logic once we switch to using incremental
// compiler for full application recompilation on restart. // compiler for full application recompilation on restart.
final bool updatedDevFS = await _updateDevFS(fullRestart: true); final bool updatedDevFS = await _updateDevFS(fullRestart: true);
_resetDirtyAssets();
if (!updatedDevFS) if (!updatedDevFS)
return new OperationResult(1, 'DevFS synchronization failed'); return new OperationResult(1, 'DevFS synchronization failed');
// Check if the isolate is paused and resume it. // Check if the isolate is paused and resume it.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment