OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 pub.solver.solve_report; | 5 library pub.solver.solve_report; |
6 | 6 |
| 7 import 'package:pub_semver/pub_semver.dart'; |
| 8 |
7 import '../lock_file.dart'; | 9 import '../lock_file.dart'; |
8 import '../log.dart' as log; | 10 import '../log.dart' as log; |
9 import '../package.dart'; | 11 import '../package.dart'; |
10 import '../source_registry.dart'; | 12 import '../source_registry.dart'; |
11 import '../utils.dart'; | 13 import '../utils.dart'; |
12 import '../version.dart'; | |
13 import 'version_solver.dart'; | 14 import 'version_solver.dart'; |
14 | 15 |
15 /// Unlike [SolveResult], which is the static data describing a resolution, | 16 /// Unlike [SolveResult], which is the static data describing a resolution, |
16 /// this class contains the mutable state used while generating the report | 17 /// this class contains the mutable state used while generating the report |
17 /// itself. | 18 /// itself. |
18 /// | 19 /// |
19 /// It's a report builder. | 20 /// It's a report builder. |
20 class SolveReport { | 21 class SolveReport { |
21 final SolveType _type; | 22 final SolveType _type; |
22 final SourceRegistry _sources; | 23 final SourceRegistry _sources; |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 void _writeId(PackageId id) { | 240 void _writeId(PackageId id) { |
240 _output.write(id.version); | 241 _output.write(id.version); |
241 | 242 |
242 var source = _sources[id.source]; | 243 var source = _sources[id.source]; |
243 if (source != _sources.defaultSource) { | 244 if (source != _sources.defaultSource) { |
244 var description = source.formatDescription(_root.dir, id.description); | 245 var description = source.formatDescription(_root.dir, id.description); |
245 _output.write(" from ${id.source} $description"); | 246 _output.write(" from ${id.source} $description"); |
246 } | 247 } |
247 } | 248 } |
248 } | 249 } |
OLD | NEW |