Index: runtime/observatory/lib/src/elements/script_inset.dart |
diff --git a/runtime/observatory/lib/src/elements/script_inset.dart b/runtime/observatory/lib/src/elements/script_inset.dart |
index 9900117fde3491fe223ed573c09a82ee3781c2ef..9988ec99756e555626906189863ec475a0f96ea0 100644 |
--- a/runtime/observatory/lib/src/elements/script_inset.dart |
+++ b/runtime/observatory/lib/src/elements/script_inset.dart |
@@ -663,12 +663,24 @@ class ScriptInsetElement extends ObservatoryElement { |
} |
Library resolveDependency(String relativeUri) { |
+ // This isn't really correct: we need to ask the embedder to do the |
+ // uri canonicalization for us, but Observatory isn't in a position |
+ // to invoke the library tag handler. Handle the most common cases. |
var targetUri = Uri.parse(script.library.uri).resolve(relativeUri); |
for (Library l in script.isolate.libraries) { |
if (targetUri.toString() == l.uri) { |
return l; |
} |
} |
+ if (targetUri.scheme == 'package') { |
floitsch
2015/11/17 01:42:31
I guess this will get worse when we have package-m
rmacnak
2015/11/17 01:53:07
Yeah. Maybe the flutter embedder could canonicaliz
|
+ targetUri = "packages/${targetUri.path}"; |
+ for (Library l in script.isolate.libraries) { |
+ if (targetUri.toString() == l.uri) { |
+ return l; |
+ } |
+ } |
+ } |
+ |
Logger.root.info("Could not resolve library dependency: $relativeUri"); |
return null; |
} |