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

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

Issue 1439403002: Fix to suppress (redundant) parse error reporting. (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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 } 463 }
464 464
465 /** 465 /**
466 * Process [options] for the given context [info]. 466 * Process [options] for the given context [info].
467 */ 467 */
468 void processOptionsForContext(ContextInfo info, Folder folder, 468 void processOptionsForContext(ContextInfo info, Folder folder,
469 {bool optionsRemoved: false}) { 469 {bool optionsRemoved: false}) {
470 Map<String, YamlNode> options; 470 Map<String, YamlNode> options;
471 try { 471 try {
472 options = analysisOptionsProvider.getOptions(folder); 472 options = analysisOptionsProvider.getOptions(folder);
473 } catch (e, stacktrace) { 473 } catch (_) {
474 AnalysisEngine.instance.logger.logError( 474 // Parse errors are reported by GenerateOptionsErrorsTask.
475 'Error processing .analysis_options',
476 new CaughtException(e, stacktrace));
477 // TODO(pquitslund): contribute plugin that sends error notification on
478 // options file.
479 // Related test:
480 // context_manager_test.test_analysis_options_parse_failure()
481 // AnalysisEngine.instance.optionsPlugin.optionsProcessors
482 // .forEach((OptionsProcessor p) => p.onError(e));
483 } 475 }
484 476
485 if (options == null && !optionsRemoved) { 477 if (options == null && !optionsRemoved) {
486 return; 478 return;
487 } 479 }
488 480
489 // Notify options processors. 481 // Notify options processors.
490 AnalysisEngine.instance.optionsPlugin.optionsProcessors 482 AnalysisEngine.instance.optionsPlugin.optionsProcessors
491 .forEach((OptionsProcessor p) { 483 .forEach((OptionsProcessor p) {
492 try { 484 try {
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 if (pathContext.basename(packagespecFile.path) == PACKAGE_SPEC_NAME) { 823 if (pathContext.basename(packagespecFile.path) == PACKAGE_SPEC_NAME) {
832 Packages packages = _readPackagespec(packagespecFile); 824 Packages packages = _readPackagespec(packagespecFile);
833 return new PackagesFileDisposition(packages); 825 return new PackagesFileDisposition(packages);
834 } 826 }
835 if (packageResolverProvider != null) { 827 if (packageResolverProvider != null) {
836 UriResolver resolver = packageResolverProvider(folder); 828 UriResolver resolver = packageResolverProvider(folder);
837 if (resolver != null) { 829 if (resolver != null) {
838 return new CustomPackageResolverDisposition(resolver); 830 return new CustomPackageResolverDisposition(resolver);
839 } 831 }
840 } 832 }
841 833
842 ServerPerformanceStatistics.pub.makeCurrentWhile(() { 834 ServerPerformanceStatistics.pub.makeCurrentWhile(() {
843 packageMapInfo = _packageMapProvider.computePackageMap(folder); 835 packageMapInfo = _packageMapProvider.computePackageMap(folder);
844 }); 836 });
845 } finally { 837 } finally {
846 callbacks.endComputePackageMap(); 838 callbacks.endComputePackageMap();
847 } 839 }
848 for (String dependencyPath in packageMapInfo.dependencies) { 840 for (String dependencyPath in packageMapInfo.dependencies) {
849 addDependency(dependencyPath); 841 addDependency(dependencyPath);
850 } 842 }
851 if (packageMapInfo.packageMap == null) { 843 if (packageMapInfo.packageMap == null) {
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
1455 var path = resourceProvider.pathContext.fromUri(uri); 1447 var path = resourceProvider.pathContext.fromUri(uri);
1456 packageMap[name] = <Folder>[resourceProvider.getFolder(path)]; 1448 packageMap[name] = <Folder>[resourceProvider.getFolder(path)];
1457 } 1449 }
1458 }); 1450 });
1459 return <UriResolver>[new SdkExtUriResolver(packageMap)]; 1451 return <UriResolver>[new SdkExtUriResolver(packageMap)];
1460 } else { 1452 } else {
1461 return const <UriResolver>[]; 1453 return const <UriResolver>[];
1462 } 1454 }
1463 } 1455 }
1464 } 1456 }
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