OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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.version_solver; | 5 library pub.solver.version_solver; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:json' as json; | 8 import "dart:convert"; |
9 | 9 |
10 import '../lock_file.dart'; | 10 import '../lock_file.dart'; |
11 import '../log.dart' as log; | 11 import '../log.dart' as log; |
12 import '../package.dart'; | 12 import '../package.dart'; |
13 import '../pubspec.dart'; | 13 import '../pubspec.dart'; |
14 import '../source.dart'; | 14 import '../source.dart'; |
15 import '../source_registry.dart'; | 15 import '../source_registry.dart'; |
16 import '../version.dart'; | 16 import '../version.dart'; |
17 import '../utils.dart'; | 17 import '../utils.dart'; |
18 import 'backtracking_solver.dart'; | 18 import 'backtracking_solver.dart'; |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 /// different descriptions are depended upon. | 286 /// different descriptions are depended upon. |
287 class DescriptionMismatchException extends SolveFailure { | 287 class DescriptionMismatchException extends SolveFailure { |
288 DescriptionMismatchException(String package, | 288 DescriptionMismatchException(String package, |
289 Iterable<Dependency> dependencies) | 289 Iterable<Dependency> dependencies) |
290 : super(package, dependencies); | 290 : super(package, dependencies); |
291 | 291 |
292 String get _message => "Incompatible dependencies on '$package'"; | 292 String get _message => "Incompatible dependencies on '$package'"; |
293 | 293 |
294 String _describeDependency(PackageDep dep) { | 294 String _describeDependency(PackageDep dep) { |
295 // TODO(nweiz): Dump descriptions to YAML when that's supported. | 295 // TODO(nweiz): Dump descriptions to YAML when that's supported. |
296 return "depends on it with description ${json.stringify(dep.description)}"; | 296 return "depends on it with description ${JSON.encode(dep.description)}"; |
297 } | 297 } |
298 } | 298 } |
OLD | NEW |