| 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('pubspec'); | 5 #library('pubspec'); |
| 6 | 6 |
| 7 #import('package.dart'); | 7 #import('package.dart'); |
| 8 #import('source.dart'); | 8 #import('source.dart'); |
| 9 #import('source_registry.dart'); | 9 #import('source_registry.dart'); |
| 10 #import('utils.dart'); | 10 #import('utils.dart'); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 'Source name $sourceName must be a string.'); | 88 'Source name $sourceName must be a string.'); |
| 89 } | 89 } |
| 90 | 90 |
| 91 source = sources[sourceName]; | 91 source = sources[sourceName]; |
| 92 description = spec[sourceName]; | 92 description = spec[sourceName]; |
| 93 } else { | 93 } else { |
| 94 throw new FormatException( | 94 throw new FormatException( |
| 95 'Dependency specification $spec must be a string or a mapping.'); | 95 'Dependency specification $spec must be a string or a mapping.'); |
| 96 } | 96 } |
| 97 | 97 |
| 98 source.validateDescription(description, fromLockFile: false); | 98 source.validateDescription(description); |
| 99 | 99 |
| 100 dependencies.add(new PackageRef( | 100 dependencies.add(new PackageRef( |
| 101 source, versionConstraint, description)); | 101 source, versionConstraint, description)); |
| 102 }); | 102 }); |
| 103 } | 103 } |
| 104 | 104 |
| 105 return new Pubspec(version, dependencies); | 105 return new Pubspec(version, dependencies); |
| 106 } | 106 } |
| 107 } | 107 } |
| OLD | NEW |