Use source list from the compiler to track invalidated files for hot reload. (#29693)

* Use source list from the compiler to track invalidated files.

* Revert accidental change

* Fix first-time-seen-the-file logic

* Fix/simplify invalidate logic now that we can rely on compiler to let us know what is the cut-off point for invalidation.

* Update devfs mock to accommodate for new fields

* Fix deleted files case

* Analyzer found missing final
This commit is contained in:
Alexander Aprelev
2019-03-20 21:58:15 -07:00
committed by GitHub
parent 553a047898
commit 12c4e050be
24 changed files with 57 additions and 372 deletions

View File

@@ -487,7 +487,7 @@ class MockResidentCompiler extends BasicMock implements ResidentCompiler {
return null;
}
@override
Future<CompilerOutput> recompile(String mainPath, List<String> invalidatedFiles, { String outputPath, String packagesFilePath }) async {
Future<CompilerOutput> recompile(String mainPath, List<Uri> invalidatedFiles, { String outputPath, String packagesFilePath }) async {
fs.file(outputPath).createSync(recursive: true);
fs.file(outputPath).writeAsStringSync('compiled_kernel_output');
return CompilerOutput(outputPath, 0, <Uri>[]);