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

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

Issue 2653143003: IncrementalKernalGenerator watch source callback (Closed)
Patch Set: Created 3 years, 11 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 4221ba8f2f2b21bc71a14ec2b54bff25c22deb5d..e26d19a967e0211a54ecd28ac85f5410e03a1caf 100644
--- a/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart
+++ b/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart
@@ -57,7 +57,8 @@ class IncrementalKernelGeneratorImpl implements IncrementalKernelGenerator {
_options = options;
@override
- Future<DeltaProgram> computeDelta() async {
+ Future<DeltaProgram> computeDelta(
+ {Future<Null> watch(Uri uri, bool used)}) async {
var deltaLibraries = await _resolvedAstGenerator.computeDelta();
var kernelOptions = _convertOptions(_options);
var packages = null; // TODO(paulberry)
@@ -76,7 +77,11 @@ class IncrementalKernelGeneratorImpl implements IncrementalKernelGenerator {
new DartLoader(repository, kernelOptions, packages, context: context);
loader.loadLibrary(uri);
kernels[uri] = new Program(repository.libraries);
+ // TODO(danrubel) rework watch invocation to eliminate race condition
Paul Berry 2017/01/25 22:03:34 Please add my name to this TODO as well.
danrubel 2017/01/25 22:40:41 I replaced my name with yours both here and below
+ // and include part source files
+ if (watch != null) watch(uri, true);
Paul Berry 2017/01/25 22:03:34 Please change to: if (watch != null) await watch(
danrubel 2017/01/25 22:40:41 That seems reasonable. I had to restructure the lo
});
+ // TODO(danrubel) invoke watch with used=false for each unused source
return new DeltaProgram(kernels);
}

Powered by Google App Engine
This is Rietveld 408576698