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

Side by Side Diff: pkg/analyzer/lib/source/config.dart

Issue 2142143002: Fixes for context_manager_test on Windows. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « pkg/analysis_server/test/context_manager_test.dart ('k') | 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'package:analyzer/file_system/file_system.dart'; 5 import 'package:analyzer/file_system/file_system.dart';
6 import 'package:analyzer/source/analysis_options_provider.dart'; 6 import 'package:analyzer/source/analysis_options_provider.dart';
7 import 'package:analyzer/src/generated/engine.dart'; 7 import 'package:analyzer/src/generated/engine.dart';
8 import 'package:analyzer/src/task/model.dart'; 8 import 'package:analyzer/src/task/model.dart';
9 import 'package:analyzer/task/model.dart'; 9 import 'package:analyzer/task/model.dart';
10 import 'package:package_config/packages.dart'; 10 import 'package:package_config/packages.dart';
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 if (config is YamlMap) { 84 if (config is YamlMap) {
85 AnalysisConfigurationDescriptor descriptor = 85 AnalysisConfigurationDescriptor descriptor =
86 new AnalysisConfigurationDescriptor.fromAnalyzerOptions(config); 86 new AnalysisConfigurationDescriptor.fromAnalyzerOptions(config);
87 87
88 if (descriptor.isValid) { 88 if (descriptor.isValid) {
89 //Create a path, given descriptor and packagemap 89 //Create a path, given descriptor and packagemap
90 Uri uri = packages.asMap()[descriptor.package]; 90 Uri uri = packages.asMap()[descriptor.package];
91 Uri pragma = new Uri.file('config/${descriptor.pragma}.yaml', 91 Uri pragma = new Uri.file('config/${descriptor.pragma}.yaml',
92 windows: false); 92 windows: false);
93 Uri optionsUri = uri.resolveUri(pragma); 93 Uri optionsUri = uri.resolveUri(pragma);
94 File file = resourceProvider.getFile(optionsUri.toFilePath()); 94 String path = resourceProvider.pathContext.fromUri(optionsUri);
95 File file = resourceProvider.getFile(path);
95 if (file.exists) { 96 if (file.exists) {
96 return optionsProvider.getOptionsFromFile(file); 97 return optionsProvider.getOptionsFromFile(file);
97 } 98 }
98 } 99 }
99 } 100 }
100 } 101 }
101 } catch (_) { 102 } catch (_) {
102 // Skip exceptional configurations. 103 // Skip exceptional configurations.
103 } 104 }
104 } 105 }
105 return null; 106 return null;
106 } 107 }
107 } 108 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/context_manager_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698