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

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

Issue 1001563003: Fix in multi-package-resolver to support files that will be created later (graph (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 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') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/checker/multi_package_resolver.dart
diff --git a/lib/src/checker/multi_package_resolver.dart b/lib/src/checker/multi_package_resolver.dart
index bd95299856cdad40ee4ac0bcd7709c845534bbc8..d006b9841ac632215f90cbedaad28bb646677808 100644
--- a/lib/src/checker/multi_package_resolver.dart
+++ b/lib/src/checker/multi_package_resolver.dart
@@ -24,7 +24,12 @@ class MultiPackageResolver extends UriResolver {
if (path == null) return null;
var resolvedPath = _resolve(path);
- if (resolvedPath == null) return null;
+ if (resolvedPath == null) {
+ // If we can't resolve it, we default to use the path with the first
+ // prefix. The returned source will have that `source.exists()` is false.
vsm 2015/03/11 20:07:50 Does this mean that the directory for generated co
Siggi Cherem (dart-lang) 2015/03/12 18:26:40 After this and our discussion offline, I decided t
+ var prefix = searchPaths.isEmpty ? '' : searchPaths[0];
+ resolvedPath = join(prefix, path);
+ }
return new FileBasedSource.con2(uri, new JavaFile(resolvedPath));
}
« no previous file with comments | « no previous file | lib/src/dependency_graph.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698