Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Unified Diff: sdk/lib/_internal/pub/lib/src/lock_file.dart

Issue 34803006: Make pubspec.lock keep relative path if it is originally specified as relative in pubspec.yaml (iss… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Improve code according to the code review comments Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/entrypoint.dart ('k') | sdk/lib/_internal/pub/lib/src/source.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/lock_file.dart
diff --git a/sdk/lib/_internal/pub/lib/src/lock_file.dart b/sdk/lib/_internal/pub/lib/src/lock_file.dart
index e3dff8011d197a68428044a11fd0d96ebefed0d9..0a2cc58bc5fd02cbbdb81c358d7153a337a62332 100644
--- a/sdk/lib/_internal/pub/lib/src/lock_file.dart
+++ b/sdk/lib/_internal/pub/lib/src/lock_file.dart
@@ -83,14 +83,20 @@ class LockFile {
}
/// Returns the serialized YAML text of the lock file.
- String serialize() {
+ ///
+ /// [packageDir] is the containing directory of the root package, used to
+ /// properly serialize package descriptions.
+ String serialize(String packageDir, SourceRegistry sources) {
// Convert the dependencies to a simple object.
var data = {};
packages.forEach((name, package) {
+ var description = sources[package.source].serializeDescription(packageDir,
+ package.description);
+
data[name] = {
- 'version': packages[name].version.toString(),
- 'source': packages[name].source,
- 'description': packages[name].description
+ 'version': package.version.toString(),
+ 'source': package.source,
+ 'description': description
};
});
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/entrypoint.dart ('k') | sdk/lib/_internal/pub/lib/src/source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698