| OLD | NEW |
| 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 library analyzer.src.context.context_builder; | 5 library analyzer.src.context.context_builder; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:core'; | 8 import 'dart:core'; |
| 9 | 9 |
| 10 import 'package:analyzer/context/declared_variables.dart'; | 10 import 'package:analyzer/context/declared_variables.dart'; |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 } catch (_) { | 386 } catch (_) { |
| 387 // Ignore exceptions thrown while trying to load the options file. | 387 // Ignore exceptions thrown while trying to load the options file. |
| 388 } | 388 } |
| 389 } else { | 389 } else { |
| 390 // Search for the default analysis options | 390 // Search for the default analysis options |
| 391 Source source; | 391 Source source; |
| 392 // TODO(danrubel) determine if bazel or gn project depends upon flutter | 392 // TODO(danrubel) determine if bazel or gn project depends upon flutter |
| 393 if (workspace.hasFlutterDependency) { | 393 if (workspace.hasFlutterDependency) { |
| 394 source = | 394 source = |
| 395 sourceFactory.forUri('package:flutter/analysis_options_user.yaml'); | 395 sourceFactory.forUri('package:flutter/analysis_options_user.yaml'); |
| 396 if (resourceProvider.pathContext.separator == r'\') { | |
| 397 // echo some debugging information | |
| 398 print('>>> hasFlutterDependency'); | |
| 399 print('>>> source: ${source?.fullName}'); | |
| 400 print('>>> source exists: ${source?.exists()}'); | |
| 401 sourceFactory.packageMap.forEach((String key, List<Folder> folders) { | |
| 402 print('>>> p $key : ${folders.map((f) => f.path).join(', ')}'); | |
| 403 }); | |
| 404 } | |
| 405 } | 396 } |
| 406 if (source == null || !source.exists()) { | 397 if (source == null || !source.exists()) { |
| 407 source = | 398 source = |
| 408 sourceFactory.forUri('package:dart.analysis_options/default.yaml'); | 399 sourceFactory.forUri('package:dart.analysis_options/default.yaml'); |
| 409 } | 400 } |
| 410 if (source.exists()) { | 401 if (source.exists()) { |
| 411 try { | 402 try { |
| 412 optionMap = optionsProvider.getOptionsFromSource(source); | 403 optionMap = optionsProvider.getOptionsFromSource(source); |
| 413 } catch (_) { | 404 } catch (_) { |
| 414 // Ignore exceptions thrown while trying to load the options file. | 405 // Ignore exceptions thrown while trying to load the options file. |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 } | 766 } |
| 776 | 767 |
| 777 /** | 768 /** |
| 778 * Find the basic workspace that contains the given [path]. | 769 * Find the basic workspace that contains the given [path]. |
| 779 */ | 770 */ |
| 780 static _BasicWorkspace find( | 771 static _BasicWorkspace find( |
| 781 ResourceProvider resourceProvider, String path, ContextBuilder builder) { | 772 ResourceProvider resourceProvider, String path, ContextBuilder builder) { |
| 782 return new _BasicWorkspace._(resourceProvider, path, builder); | 773 return new _BasicWorkspace._(resourceProvider, path, builder); |
| 783 } | 774 } |
| 784 } | 775 } |
| OLD | NEW |