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

Unified Diff: pkg/front_end/test/src/incremental/hot_reload_e2e_test.dart

Issue 2993113003: Revert "Switch FE to use the libraries.json format." (Closed)
Patch Set: Created 3 years, 4 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/test/src/incremental/hot_reload_e2e_test.dart
diff --git a/pkg/front_end/test/src/incremental/hot_reload_e2e_test.dart b/pkg/front_end/test/src/incremental/hot_reload_e2e_test.dart
index 0571ed8efcc70b29c3e686495512c01d8619ce69..0740dfc52150f164f9b4d3abb985b2d0e3f9e799 100644
--- a/pkg/front_end/test/src/incremental/hot_reload_e2e_test.dart
+++ b/pkg/front_end/test/src/incremental/hot_reload_e2e_test.dart
@@ -175,14 +175,24 @@ Future<IncrementalKernelGenerator> createIncrementalCompiler(
var entryUri = Uri.base.resolve(entry);
var options = new CompilerOptions()
..sdkRoot = sdkRoot
+ ..sdkSummary = sdkRoot.resolve('outline.dill')
..packagesFileUri = Uri.parse('file:///.packages')
..strongMode = false
- ..compileSdk = true // the incremental generator requires the sdk sources
+ ..dartLibraries = loadDartLibraries()
..fileSystem = fs
..byteStore = new MemoryByteStore();
return IncrementalKernelGenerator.newInstance(options, entryUri);
}
+Map<String, Uri> loadDartLibraries() {
+ var libraries = sdkRoot.resolve('lib/libraries.json');
+ var map =
+ JSON.decode(new File.fromUri(libraries).readAsStringSync())['libraries'];
+ var dartLibraries = <String, Uri>{};
+ map.forEach((k, v) => dartLibraries[k] = libraries.resolve(v));
+ return dartLibraries;
+}
+
Future<bool> rebuild(IncrementalKernelGenerator compiler, Uri outputUri) async {
compiler.invalidate(Uri.parse("file:///a.dart"));
compiler.invalidate(Uri.parse("file:///b.dart"));
« no previous file with comments | « pkg/front_end/test/src/incremental/file_state_test.dart ('k') | pkg/front_end/test/src/incremental/kernel_driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698