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

Unified Diff: pkg/analyzer/lib/src/generated/source.dart

Issue 1224693014: Fix for URI resolution w/ file scheme set in package map. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 | pkg/analyzer/test/generated/source_factory_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/source.dart
diff --git a/pkg/analyzer/lib/src/generated/source.dart b/pkg/analyzer/lib/src/generated/source.dart
index 75c175a512838db98c4301e6d37e3fa3d660304f..5b96dbd83198b1dc52ff1558ed8587a746e93809 100644
--- a/pkg/analyzer/lib/src/generated/source.dart
+++ b/pkg/analyzer/lib/src/generated/source.dart
@@ -818,10 +818,11 @@ class SourceFactory {
if (_packages != null && containedUri.scheme == 'package') {
Uri packageUri =
_packages.resolve(containedUri, notFound: (Uri packageUri) => null);
- //TODO(pquitslund): package_config needs to be updated to set schemes for file URIs.
+ // Ensure scheme is set.
if (packageUri != null && packageUri.scheme == '') {
- containedUri = packageUri.replace(scheme: 'file');
+ packageUri = packageUri.replace(scheme: 'file');
}
+ containedUri = packageUri;
}
for (UriResolver resolver in _resolvers) {
Source result = resolver.resolveAbsolute(containedUri);
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/source_factory_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698