Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2402)

Unified Diff: pkg/front_end/lib/src/incremental_kernel_generator_impl.dart

Issue 2931183003: Implement promised watch behaviour for used == true. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/incremental_kernel_generator_impl.dart
diff --git a/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart b/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart
index b241aaba4252f0ca5739978001597faad5bedabd..0211a42b668465923597b2282d8e0c58c15717e3 100644
--- a/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart
+++ b/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart
@@ -74,16 +74,17 @@ class IncrementalKernelGeneratorImpl implements IncrementalKernelGenerator {
final Set<Uri> _invalidatedFiles = new Set<Uri>();
IncrementalKernelGeneratorImpl(
- this._options, this._uriTranslator, this._entryPoint)
+ this._options, this._uriTranslator, this._entryPoint,
+ {WatchUsedFilesFn watch})
: _logger = _options.logger,
_byteStore = _options.byteStore {
_computeSalt();
- _fsState = new FileSystemState(_options.fileSystem, _uriTranslator, _salt);
+ _fsState = new FileSystemState(
+ _options.fileSystem, _uriTranslator, _salt, (uri) => watch(uri, true));
Siggi Cherem (dart-lang) 2017/06/14 21:56:24 Don't we need to check here that `watch` is not nu
scheglov 2017/06/14 21:58:56 You're right, this is a bug. It was fixed in a nex
Siggi Cherem (dart-lang) 2017/06/14 22:25:00 thanks - just saw the fix you landed later, thanks
}
@override
- Future<DeltaProgram> computeDelta(
- {Future<Null> watch(Uri uri, bool used)}) async {
+ Future<DeltaProgram> computeDelta() async {
return await _logger.runAsync('Compute delta', () async {
await _refreshInvalidatedFiles();
@@ -128,8 +129,6 @@ class IncrementalKernelGeneratorImpl implements IncrementalKernelGenerator {
}
}
- if (watch != null) _fsState.fileUris.forEach((f) => watch(f, true));
-
// TODO(scheglov) Add libraries which import changed libraries.
// For now the corresponding test works because we use full library
// contents to compute signatures (not just API parts). So, every library
« no previous file with comments | « pkg/front_end/lib/src/incremental/file_state.dart ('k') | pkg/front_end/test/incremental_kernel_generator_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698