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

Unified Diff: pkg/front_end/example/incremental_reload/compiler_with_invalidation.dart

Issue 2986303003: Switch FE to use the libraries.json format. (Closed)
Patch Set: fix issues found on bots 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
« no previous file with comments | « pkg/compiler/lib/src/library_loader.dart ('k') | pkg/front_end/lib/compiler_options.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/example/incremental_reload/compiler_with_invalidation.dart
diff --git a/pkg/front_end/example/incremental_reload/compiler_with_invalidation.dart b/pkg/front_end/example/incremental_reload/compiler_with_invalidation.dart
index c5d976027032fa73ea36adf4878edf736f423ab4..061771c9e54ce775f8b32280931105da699801f4 100644
--- a/pkg/front_end/example/incremental_reload/compiler_with_invalidation.dart
+++ b/pkg/front_end/example/incremental_reload/compiler_with_invalidation.dart
@@ -9,7 +9,6 @@ library front_end.example.incremental_reload.compiler_with_invalidation;
import 'dart:io';
import 'dart:async';
-import 'dart:convert' show JSON;
import 'package:front_end/compiler_options.dart';
import 'package:front_end/incremental_kernel_generator.dart';
@@ -33,7 +32,6 @@ Future<IncrementalCompiler> createIncrementalCompiler(String entry,
..sdkRoot = sdkRoot
..packagesFileUri = Uri.base.resolve('.packages')
..strongMode = false
- ..dartLibraries = loadDartLibraries(sdkRoot)
// Note: we do not report error on the console because the incremental
// compiler is an ongoing background service that shouldn't polute stdout.
// TODO(sigmund): do something with the errors.
@@ -43,18 +41,6 @@ Future<IncrementalCompiler> createIncrementalCompiler(String entry,
return IncrementalCompiler.create(options, entryUri);
}
-/// Reads the `libraries.json` file for an SDK to provide the location of the
-/// SDK files.
-// TODO(sigmund): this should be handled by package:front_end internally.
-Map<String, Uri> loadDartLibraries(Uri sdkRoot) {
- 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;
-}
-
/// An incremental compiler that monitors file modifications on disk and
/// invalidates only files that have been modified since the previous time the
/// compiler was invoked.
« no previous file with comments | « pkg/compiler/lib/src/library_loader.dart ('k') | pkg/front_end/lib/compiler_options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698