| OLD | NEW |
| 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 package.map.provider; | 5 library source.package_map_provider; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 import 'dart:io' as io; | 9 import 'dart:io' as io; |
| 10 | 10 |
| 11 import 'package:analyzer/file_system/file_system.dart'; | 11 import 'package:analyzer/file_system/file_system.dart'; |
| 12 import 'package:analyzer/src/generated/engine.dart'; | 12 import 'package:analyzer/src/generated/engine.dart'; |
| 13 import 'package:analyzer/src/generated/sdk_io.dart'; | 13 import 'package:analyzer/src/generated/sdk_io.dart'; |
| 14 import 'package:path/path.dart'; | 14 import 'package:path/path.dart'; |
| 15 | 15 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 */ | 161 */ |
| 162 PackageMapInfo _error(Folder folder) { | 162 PackageMapInfo _error(Folder folder) { |
| 163 // Even if an error occurs, we still need to know the dependencies, so that | 163 // Even if an error occurs, we still need to know the dependencies, so that |
| 164 // we'll know when to try running "pub list-package-dirs" again. | 164 // we'll know when to try running "pub list-package-dirs" again. |
| 165 // Unfortunately, "pub list-package-dirs" doesn't tell us dependencies when | 165 // Unfortunately, "pub list-package-dirs" doesn't tell us dependencies when |
| 166 // an error occurs, so just assume there is one dependency, "pubspec.lock". | 166 // an error occurs, so just assume there is one dependency, "pubspec.lock". |
| 167 List<String> dependencies = <String>[join(folder.path, PUBSPEC_LOCK_NAME)]; | 167 List<String> dependencies = <String>[join(folder.path, PUBSPEC_LOCK_NAME)]; |
| 168 return new PackageMapInfo(null, dependencies.toSet()); | 168 return new PackageMapInfo(null, dependencies.toSet()); |
| 169 } | 169 } |
| 170 } | 170 } |
| OLD | NEW |