 Chromium Code Reviews
 Chromium Code Reviews Issue 10540151:
  First pass at version constraint solver.  (Closed) 
  Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
    
  
    Issue 10540151:
  First pass at version constraint solver.  (Closed) 
  Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart| Index: utils/pub/package.dart | 
| diff --git a/utils/pub/package.dart b/utils/pub/package.dart | 
| index 7bb50dfa653420c36e12a8b79f5ab9bc471dc0e5..cb96493686f8664828f3db747927660c3331cfee 100644 | 
| --- a/utils/pub/package.dart | 
| +++ b/utils/pub/package.dart | 
| @@ -61,6 +61,15 @@ class Package { | 
| */ | 
| Collection<PackageRef> get dependencies() => pubspec.dependencies; | 
| + // TODO(rnystrom): This is so far only used for mock packages in tests. Is | 
| + // it worth keeping this around? | 
| 
nweiz
2012/06/18 18:29:19
Seems fine to me.
 
Bob Nystrom
2012/06/20 01:40:04
Done.
 | 
| + /** | 
| + * Constructs a package with the given name and pubspec. The package will | 
| + * no directory associated with it. | 
| + */ | 
| + Package.inMemory(this.name, this.pubspec) | 
| + : dir = null; | 
| + | 
| /** | 
| * Constructs a package. This should not be called directly. Instead, acquire | 
| * packages from [load()]. | 
| @@ -72,7 +81,7 @@ class Package { | 
| /** | 
| * Returns a debug string for the package. | 
| */ | 
| - String toString() => '$name ($dir)'; | 
| + String toString() => '$name $version ($dir)'; | 
| } | 
| /** |