| 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 } |
| 396 } | 405 } |
| 397 if (source == null || !source.exists()) { | 406 if (source == null || !source.exists()) { |
| 398 source = | 407 source = |
| 399 sourceFactory.forUri('package:dart.analysis_options/default.yaml'); | 408 sourceFactory.forUri('package:dart.analysis_options/default.yaml'); |
| 400 } | 409 } |
| 401 if (source.exists()) { | 410 if (source.exists()) { |
| 402 try { | 411 try { |
| 403 optionMap = optionsProvider.getOptionsFromSource(source); | 412 optionMap = optionsProvider.getOptionsFromSource(source); |
| 404 } catch (_) { | 413 } catch (_) { |
| 405 // Ignore exceptions thrown while trying to load the options file. | 414 // Ignore exceptions thrown while trying to load the options file. |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 } | 775 } |
| 767 | 776 |
| 768 /** | 777 /** |
| 769 * Find the basic workspace that contains the given [path]. | 778 * Find the basic workspace that contains the given [path]. |
| 770 */ | 779 */ |
| 771 static _BasicWorkspace find( | 780 static _BasicWorkspace find( |
| 772 ResourceProvider resourceProvider, String path, ContextBuilder builder) { | 781 ResourceProvider resourceProvider, String path, ContextBuilder builder) { |
| 773 return new _BasicWorkspace._(resourceProvider, path, builder); | 782 return new _BasicWorkspace._(resourceProvider, path, builder); |
| 774 } | 783 } |
| 775 } | 784 } |
| OLD | NEW |