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

Side by Side Diff: utils/pub/source.dart

Issue 10399076: Get codebase ready for actually supporting versioning. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tiny tweak. Created 8 years, 7 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 /** 5 /**
6 * A source from which to install packages. 6 * A source from which to install packages.
7 * 7 *
8 * Each source has many packages that it looks up using [PackageId]s. The source 8 * Each source has many packages that it looks up using [PackageId]s. The source
9 * is responsible for installing these packages to the package cache. 9 * is responsible for installing these packages to the package cache.
10 */ 10 */
(...skipping 23 matching lines...) Expand all
34 * If [shouldCache] is true, [path] will be a path to this source's 34 * If [shouldCache] is true, [path] will be a path to this source's
35 * subdirectory of the [PackageCache]'s cache directory. If [shouldCache] is 35 * subdirectory of the [PackageCache]'s cache directory. If [shouldCache] is
36 * false, [path] will be a path to the application's "packages" directory. 36 * false, [path] will be a path to the application's "packages" directory.
37 * 37 *
38 * [path] is guaranteed not to exist, and its parent directory is guaranteed 38 * [path] is guaranteed not to exist, and its parent directory is guaranteed
39 * to exist. 39 * to exist.
40 */ 40 */
41 abstract Future<bool> install(PackageId id, String path); 41 abstract Future<bool> install(PackageId id, String path);
42 42
43 /** 43 /**
44 * Returns the name of the package identified by [id]. By default, this is 44 * Returns a human-friendly name for the package identified by [id]. This
45 * just `id.fullName`, but some sources (e.g. Git) may have more complicated 45 * method should be light-weight. It doesn't need to validate that the given
46 * resolution logic. 46 * package exists.
47 *
48 * This method should be light-weight. It doesn't need to validate that the
49 * given package exists.
50 * 47 *
51 * The package name should be lower-case and suitable for use in a filename. 48 * The package name should be lower-case and suitable for use in a filename.
52 * It may contain forward slashes. 49 * It may contain forward slashes.
53 */ 50 */
54 String packageName(PackageId id) => id.fullName; 51 abstract String packageName(PackageId id);
nweiz 2012/05/18 00:08:24 I feel like id.description is still a good default
Bob Nystrom 2012/05/18 20:02:38 Done.
55 } 52 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698