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

Side by Side Diff: pkg/analysis_server/lib/src/context_manager.dart

Issue 1438293002: Server notification to indicate `pub list-dir` fallback. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library context.directory.manager; 5 library context.directory.manager;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:convert'; 9 import 'dart:convert';
10 import 'dart:core' hide Resource; 10 import 'dart:core' hide Resource;
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 if (pathContext.basename(packagespecFile.path) == PACKAGE_SPEC_NAME) { 831 if (pathContext.basename(packagespecFile.path) == PACKAGE_SPEC_NAME) {
832 Packages packages = _readPackagespec(packagespecFile); 832 Packages packages = _readPackagespec(packagespecFile);
833 return new PackagesFileDisposition(packages); 833 return new PackagesFileDisposition(packages);
834 } 834 }
835 if (packageResolverProvider != null) { 835 if (packageResolverProvider != null) {
836 UriResolver resolver = packageResolverProvider(folder); 836 UriResolver resolver = packageResolverProvider(folder);
837 if (resolver != null) { 837 if (resolver != null) {
838 return new CustomPackageResolverDisposition(resolver); 838 return new CustomPackageResolverDisposition(resolver);
839 } 839 }
840 } 840 }
841
842 // Notify server that no `.packages` file was found (and there is no
843 // alternative resolver provider).
844 AnalysisEngine.instance.logger.logError(
845 'No `.packages` for $folder, falling back to `pub`.');
846
841 ServerPerformanceStatistics.pub.makeCurrentWhile(() { 847 ServerPerformanceStatistics.pub.makeCurrentWhile(() {
842 packageMapInfo = _packageMapProvider.computePackageMap(folder); 848 packageMapInfo = _packageMapProvider.computePackageMap(folder);
843 }); 849 });
844 } finally { 850 } finally {
845 callbacks.endComputePackageMap(); 851 callbacks.endComputePackageMap();
846 } 852 }
847 for (String dependencyPath in packageMapInfo.dependencies) { 853 for (String dependencyPath in packageMapInfo.dependencies) {
848 addDependency(dependencyPath); 854 addDependency(dependencyPath);
849 } 855 }
850 if (packageMapInfo.packageMap == null) { 856 if (packageMapInfo.packageMap == null) {
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
1454 var path = resourceProvider.pathContext.fromUri(uri); 1460 var path = resourceProvider.pathContext.fromUri(uri);
1455 packageMap[name] = <Folder>[resourceProvider.getFolder(path)]; 1461 packageMap[name] = <Folder>[resourceProvider.getFolder(path)];
1456 } 1462 }
1457 }); 1463 });
1458 return <UriResolver>[new SdkExtUriResolver(packageMap)]; 1464 return <UriResolver>[new SdkExtUriResolver(packageMap)];
1459 } else { 1465 } else {
1460 return const <UriResolver>[]; 1466 return const <UriResolver>[];
1461 } 1467 }
1462 } 1468 }
1463 } 1469 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698