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

Unified Diff: lib/src/dependency_graph.dart

Issue 1160223006: Fix DDC errors on DDC (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: address comments 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 | « lib/src/codegen/side_effect_analysis.dart ('k') | lib/src/info.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/dependency_graph.dart
diff --git a/lib/src/dependency_graph.dart b/lib/src/dependency_graph.dart
index 14dda6285276b43b7cce56f621cb61943caf6fbf..96e4bfaf208f464299eb8745c272c1842baa2e07 100644
--- a/lib/src/dependency_graph.dart
+++ b/lib/src/dependency_graph.dart
@@ -17,7 +17,8 @@ import 'package:analyzer/src/generated/ast.dart'
ImportDirective,
LibraryDirective,
PartDirective,
- PartOfDirective;
+ PartOfDirective,
+ UriBasedDirective;
import 'package:analyzer/src/generated/engine.dart'
show ParseDartTask, AnalysisContext;
import 'package:analyzer/src/generated/source.dart' show Source, SourceKind;
@@ -279,11 +280,13 @@ class DartSourceNode extends SourceNode {
if (d is PartOfDirective) return;
if (d is LibraryDirective) continue;
+ var directiveUri = (d as UriBasedDirective).uri;
+
// `dart:core` and other similar URLs only contain a name, but it is
// meant to be a folder when resolving relative paths from it.
var targetUri = uri.scheme == 'dart' && uri.pathSegments.length == 1
- ? Uri.parse('$uri/').resolve(d.uri.stringValue)
- : uri.resolve(d.uri.stringValue);
+ ? Uri.parse('$uri/').resolve(directiveUri.stringValue)
+ : uri.resolve(directiveUri.stringValue);
var target =
ParseDartTask.resolveDirective(graph._context, _source, d, null);
if (target != null) {
« no previous file with comments | « lib/src/codegen/side_effect_analysis.dart ('k') | lib/src/info.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698