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

Unified Diff: lib/src/checker/resolver.dart

Issue 1146503003: fixes #183, remove our InMemory* in favor of analyzer's impl (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | lib/src/dependency_graph.dart » ('j') | test/runtime/dart_runtime_test.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/checker/resolver.dart
diff --git a/lib/src/checker/resolver.dart b/lib/src/checker/resolver.dart
index 954bdfa3bc8536f76ade701bb1f2b997c1b38f3c..6c0f2a83219c0c5417c928e9ba15702dc7fc9a67 100644
--- a/lib/src/checker/resolver.dart
+++ b/lib/src/checker/resolver.dart
@@ -7,6 +7,8 @@
library dev_compiler.src.checker.resolver;
import 'package:analyzer/analyzer.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/file_system/memory_file_system.dart';
import 'package:analyzer/src/generated/ast.dart';
import 'package:analyzer/src/generated/element.dart';
import 'package:analyzer/src/generated/engine.dart';
@@ -22,7 +24,6 @@ import 'package:analyzer/src/generated/utilities_collection.dart'
import 'package:logging/logging.dart' as logger;
import 'package:path/path.dart' as path;
-import 'package:dev_compiler/src/in_memory.dart';
import 'package:dev_compiler/src/options.dart';
import 'package:dev_compiler/src/utils.dart';
import 'dart_sdk.dart';
@@ -80,8 +81,9 @@ class TypeResolver {
UriResolver _createImplicitEntryResolver(ResolverOptions options) {
var entry = path.absolute(ResolverOptions.implicitHtmlFile);
var src = path.absolute(options.entryPointFile);
- var index = <String, String>{'$entry': _implicitEntryHtml(src)};
- return new InMemoryUriResolver(index, representNonExistingFiles: false);
+ var provider = new MemoryResourceProvider();
+ provider.newFile(entry, _implicitEntryHtml(src));
+ return new ResourceUriResolver(provider);
}
/// Creates an analysis context that contains our restricted typing rules.
« no previous file with comments | « no previous file | lib/src/dependency_graph.dart » ('j') | test/runtime/dart_runtime_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698